Skip to content

Commit

Permalink
修复标签转义错误
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 4, 2015
1 parent 8215218 commit b082670
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/MDEditor.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@
MDEditor.prototype.load = function() {
var self = this, box = self.obj[0], index = 0;
if (box) {
if (box.innerHTML !== "") self.opts.value = box.innerHTML.replace(/\&gt\;/g, ">").replace(/\&lt\;/g, ">"),
if (box.innerHTML !== "") self.opts.value = box.innerHTML.replace(/\&gt\;/g, ">").replace(/\&lt\;/g, "<"),
box.innerHTML = "";
box.appendChild(self.preview), box.appendChild(self.tools), box.appendChild(self.textarea);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/MDEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
if(box.innerHTML!=="")
self.opts.value = box.innerHTML
.replace(/\&gt\;/g,'>')
.replace(/\&lt\;/g,'>'),
.replace(/\&lt\;/g,'<'),
box.innerHTML='';
box.appendChild(self.preview),
box.appendChild(self.tools),
Expand Down

0 comments on commit b082670

Please sign in to comment.