FF: Whitespace stripping in RichText too slow
The following line in RichText?.js takes many seconds to process a single buffer with non-breakable space in it.
if(!ec.replace(/^(?:\s|\xA0)+/g, "").replace(/(?:\s|\xA0)+$/g,"").length){ ec = ""; }
Thanks to [email protected]… for narrowing this down. Pasting the following example into test_Editor.html (then put the focus outside of the editor to trigger) takes roughly 16 seconds to process this single line of code! The trick is, I think it has to have non-breaking spaces (\xa0) and trac converts them all to space... not sure how to post reproducible data here.
<div>
<p>Get started by clicking a button above.</p>
<ul>
<li>Add an entry to this activity - you can attach files & bookmarks to entries.</li>
<li>Share this activity by clicking Add Members on the left-hand side.</li>
<li>Add a section to organize to-do items and entries.</li>
</ul>
<br/> <p><a href="#">Learn more</a> | <a href="#">Watch demo</a></p>
</div>
Change History (3)
Resolution: |
→ fixed
|
Status: |
new →
closed
|
Description: |
modified (diff)
|
fixed in [13766]