Dijit Editor removes all
entities from user input.
With a Dijit Editor in hand, go into HTML mode, enter some text with some
inside. Go back to WYSIWYG mode, back to HTML mode, then see that your entity disappeared.
Is there any workaround?
HTML
<h1>Test file for Editor &nbsp support</h1>
<div id="br" data-dojo-type="dijit.Editor" data-dojo-props='plugins:["viewsource"]'><p>a b</p></div>
Javascript
require(['dijit/dijit', 'dijit/Editor', 'dijit/_editor/plugins/ViewSource', 'dojo/parser'], function(dijit, editor, viewSource, parser){});
And the same here to play : http://jsfiddle.net/ABaYL/2/
I think this problem is not dojo related.
The entity did not disappear. It was converted to its character. The entity " " was converted to its representation as a character " ". So the entites respresentation is still there. If you want to display , write "& amp ; nbsp;" without the spaces, but i think you already know that since you managed to display in your post. Even the stackoverflow editors filters to its representation.
Take a look here:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.