question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`convertContentsForEditor` cannot parse `style="font-size: 'Courier New'"`

See original GitHub issue

Describe the bug convertContentsForEditor cannot parse style="font-size: 'Courier New'"

To Reproduce

  1. 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>`);
  1. 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:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JiHong88commented, Sep 7, 2021

@rexpan Sorry, The work was delayed… I will update it as soon as possible.

1reaction
JiHong88commented, Aug 6, 2021

This issue is already resolved. I’ll notify you after version update.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found