Skip to content

Commit 9d1f327

Browse files
committed
Revert the previous fix for apostrophes
It doesn't cover all the cases. There's a simpler and better fix. This reverts commit 803a814.
1 parent b73f920 commit 9d1f327

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/RichTextEditor.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export default class RichTextEditor extends Component {
113113
}
114114
this.setTitlePlaceholder(this.props.titlePlaceholder);
115115
this.setContentPlaceholder(this.props.contentPlaceholder);
116-
this.setTitleHTML(this.htmlEcodeString(this.props.initialTitleHTML));
117-
this.setContentHTML(this.htmlEcodeString(this.props.initialContentHTML));
116+
this.setTitleHTML(this.props.initialTitleHTML);
117+
this.setContentHTML(this.props.initialContentHTML);
118118
this.props.editorInitializedCallback && this.props.editorInitializedCallback();
119119

120120
break;
@@ -254,12 +254,6 @@ export default class RichTextEditor extends Component {
254254
.replace(/[\t]/g, '\\t');
255255
};
256256

257-
htmlEcodeString = function (string) {
258-
//for some reason there's an issue only with apostrophes
259-
return string
260-
.replace(/'/g, ''');
261-
}
262-
263257
_sendAction(action, data) {
264258
let jsonString = JSON.stringify({type: action, data});
265259
jsonString = this.escapeJSONString(jsonString);
@@ -374,7 +368,8 @@ export default class RichTextEditor extends Component {
374368
}
375369

376370
insertLink(url, title) {
377-
this._sendAction(actions.insertLink, {url, title: this.htmlEcodeString(title)});
371+
372+
this._sendAction(actions.insertLink, {url, title});
378373
}
379374

380375
insertImage(url, alt) {

0 commit comments

Comments
 (0)