Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 100 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 101 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 47 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 217 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 218 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 217 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 218 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -442,9 +442,11 @@ |
443 | 443 | html = html |
444 | 444 | .replace( /\r?\n/g, "" ) // IE7 inserts newlines before block elements |
445 | 445 | .replace( / /g, " " ) // We inserted these to prevent IE from collapsing spaces |
| 446 | + .replace( /\<br[^\>]*\>\s*\<\/p\>/gi, '</p>' ) // Remove trailing <br> from <p> |
| 447 | + .replace( /\<p[^\>]*\>\s*\<\/p\>/gi, '' ) // Collapse empty <p> |
| 448 | + .replace( /\<\/p\>\s*\<p[^\>]*\>/gi, "\n" ) // Easy case for <p> conversion |
446 | 449 | .replace( /\<br[^\>]*\>/gi, "\n" ) // <br> conversion |
447 | | - .replace( /\<\/p\>\<p\>/gi, "\n" ) // Easy case for <p> conversion |
448 | | - .replace( /\<\/p\>(\n*)\<p\>/gi, "$1\n" ); |
| 450 | + .replace( /\<\/p\>(\n*)\<p[^\>]*\>/gi, "$1\n" ); |
449 | 451 | // Save leading and trailing whitespace now and restore it later. IE eats it all, and even Firefox |
450 | 452 | // won't leave everything alone |
451 | 453 | var leading = html.match( /^\s*/ )[0]; |