Skip to content

Commit

Permalink
Merge pull request #902 from ckeditor/t/877
Browse files Browse the repository at this point in the history
Fix for error in PFW when bullets use special characters [#877]
  • Loading branch information
f1ames authored Oct 6, 2017
2 parents a67b6a1 + dfea9ba commit be5e952
Show file tree
Hide file tree
Showing 11 changed files with 1,929 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Fixed Issues:
* [#862](https://github.com/ckeditor/ckeditor-dev/issues/862): Fixed: "Object Styles" group in [Styles Combo](https://ckeditor.com/addon/stylescombo) plugin is visible only if whole element is selected.
* [#994](https://github.com/ckeditor/ckeditor-dev/pull/994): Fixed: Typo in [`CKEDITOR.focusManager.focus`](https://docs.ckeditor.com/#!/api/CKEDITOR.focusManager-method-focus) API documentation. Thanks to [benjy](https://github.com/benjy)!
* [#1014](https://github.com/ckeditor/ckeditor-dev/issues/1014): Fixed: [Table Tools](https://ckeditor.com/addon/tabletools) cell properties dialog is now [ACF](http://docs.ckeditor.com/#!/guide/dev_acf) aware - it not possible to change cell width/height if corresponding styles are disabled.
* [#877](https://github.com/ckeditor/ckeditor-dev/issues/877): Fixed: Lists with custom bullets with exotic characters crashes editor when [pasted from Word](http://ckeditor.com/addon/pastefromword).

Other Changes:

Expand Down
3 changes: 2 additions & 1 deletion plugins/pastefromword/filter/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,8 @@
symbol = element.attributes[ 'cke-symbol' ];

element.forEach( function( node ) {
if ( !removed && node.value.match( symbol.replace( ')', '\\)' ).replace( '(', '' ) ) ) {
// Since symbol may contains special characters we use `indexOf` (instead of RegExp) which is sufficient (#877).
if ( !removed && node.value.indexOf( symbol ) > -1 ) {

node.value = node.value.replace( symbol, '' );

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<ul>
<li>
<span style="font-family:calibri,sans-serif">
<span style="font-size:11pt">
<span style="line-height:107%">one</span>
</span>
</span>
<ul>
<li>
<span style="font-family:calibri,sans-serif">
<span style="font-size:11pt">
<span style="line-height:107%">two</span>
</span>
</span>
<ul>
<li>
<span style="font-family:calibri,sans-serif">
<span style="font-size:11pt">
<span style="line-height:107%">three</span>
</span>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<ul>
<li>
<span style="font-style:normal">
<span style="font-weight:normal">one</span>
</span>
<ul style="list-style-type:disc">
<li>
<span style="color:#000000">
<span style="font-family:calibri,sans-serif">
<span style="font-size:11pt">
<span style="font-style:normal">
<span style="font-weight:normal">two</span>
</span>
</span>
</span>
</span>
<ul style="list-style-type:disc">
<li>
<span style="color:#000000">
<span style="font-family:calibri,sans-serif">
<span style="font-size:11pt">
<span style="font-style:normal">
<span style="font-weight:normal">three</span>
</span>
</span>
</span>
</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>
Loading

0 comments on commit be5e952

Please sign in to comment.