Summary: | Copying a list from Microsoft Word to TinyMCE fails when mso-list is the first property | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | HTML Editing | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, thespyder, webkit-bug-importer, wenson_hsieh | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 182564 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Ryosuke Niwa
2018-02-19 13:23:37 PST
As we finished capturing the Safari clipboard data for our test documents, another failing case popped up - Word can also put newlines in the style attribute :) <p class=MsoNormal style='margin-left:0cm;text-indent:0cm;mso-pagination:none; mso-list:l0 level1 lfo1;mso-layout-grid-align:none;text-autospace:none'> Created attachment 336844 [details]
Fixes the bug
Comment on attachment 336844 [details] Fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=336844&action=review r=me > Source/WebCore/editing/markup.cpp:432 > + return style.startsWith("mso-list:") || style.contains(";mso-list:") || style.contains("\nmso-list:"); I wonder if we should just regex this at some point :P (In reply to Wenson Hsieh from comment #4) > Comment on attachment 336844 [details] > Fixes the bug > > View in context: > https://bugs.webkit.org/attachment.cgi?id=336844&action=review > > r=me > > > Source/WebCore/editing/markup.cpp:432 > > + return style.startsWith("mso-list:") || style.contains(";mso-list:") || style.contains("\nmso-list:"); > > I wonder if we should just regex this at some point :P Haha, I did think about that. Comment on attachment 336844 [details]
Fixes the bug
Thanks for the review. We'd consider using a regular expression if we find more bugs.
Comment on attachment 336844 [details] Fixes the bug Clearing flags on attachment: 336844 Committed r230120: <https://trac.webkit.org/changeset/230120> All reviewed patches have been landed. Closing bug. |