`convertContentsForEditor` cannot parse `style="font-size: 'Courier New'"`
See original GitHub issueDescribe the bug
convertContentsForEditor
cannot parse style="font-size: 'Courier New'"
To Reproduce
- Set the contents as below HTML
<p><span style="font-size: 'Courier New'">aaa bbb ccc</span></p>
editor.core.setContents(`<p><span style="font-size: 'Courier New'">aaa bbb ccc</span></p>`);
- In
convertContentsForEditor
// after
contents = this._deleteDisallowedTags(this._parser.parseFromString(contents, 'text/html').body.innerHTML).replace(/(<[a-zA-Z0-9\-]+)[^>]*(?=>)/g, this._cleanTags.bind(this, false));
// the contents value is
"<p><span style="font-size: '>aaa bbb ccc</span></p>"
Expected behavior
Should correctly parse style="font-size: 'Courier New'"
Screenshots
https://user-images.githubusercontent.com/313189/128361770-20268f23-1657-4e94-8157-1a09f3e9a57a.mp4
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Version: 94
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SunEditor - CodePen
className="se-list-layer";let a=e.font?e.font:["Arial","Comic Sans MS","Courier New","Impact","Georgia","tahoma","Trebuchet MS","Verdana"],r='<div ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rexpan Sorry, The work was delayed… I will update it as soon as possible.
This issue is already resolved. I’ll notify you after version update.