@@ -113,8 +113,8 @@ export default class RichTextEditor extends Component {
113
113
}
114
114
this . setTitlePlaceholder ( this . props . titlePlaceholder ) ;
115
115
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 ) ;
118
118
this . props . editorInitializedCallback && this . props . editorInitializedCallback ( ) ;
119
119
120
120
break ;
@@ -254,12 +254,6 @@ export default class RichTextEditor extends Component {
254
254
. replace ( / [ \t ] / g, '\\t' ) ;
255
255
} ;
256
256
257
- htmlEcodeString = function ( string ) {
258
- //for some reason there's an issue only with apostrophes
259
- return string
260
- . replace ( / ' / g, ''' ) ;
261
- }
262
-
263
257
_sendAction ( action , data ) {
264
258
let jsonString = JSON . stringify ( { type : action , data} ) ;
265
259
jsonString = this . escapeJSONString ( jsonString ) ;
@@ -374,7 +368,8 @@ export default class RichTextEditor extends Component {
374
368
}
375
369
376
370
insertLink ( url , title ) {
377
- this . _sendAction ( actions . insertLink , { url, title : this . htmlEcodeString ( title ) } ) ;
371
+
372
+ this . _sendAction ( actions . insertLink , { url, title} ) ;
378
373
}
379
374
380
375
insertImage ( url , alt ) {
0 commit comments