Browse Source

Fix the issue with apostrophes in a better way

Yevhen Pavliuk 8 years ago
parent
commit
0ac75f83ab
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      src/RichTextEditor.js

+ 1
- 0
src/RichTextEditor.js View File

@@ -246,6 +246,7 @@ export default class RichTextEditor extends Component {
246 246
     return string
247 247
       .replace(/[\\]/g, '\\\\')
248 248
       .replace(/[\"]/g, '\\\"')
249
+      .replace(/[\']/g, '\\\'')
249 250
       .replace(/[\/]/g, '\\/')
250 251
       .replace(/[\b]/g, '\\b')
251 252
       .replace(/[\f]/g, '\\f')