Fixing several problems with TiynMCE, triggering of autosave() on an empty post in Safari 3.1, <br> tags in FF, <object> tag may break if switching from Visual to HTML mode and back several times, little cleanup of the compressor and others. Props azaozz. fixes #6384

git-svn-id: https://develop.svn.wordpress.org/trunk@7513 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-26 03:22:53 +00:00
parent 1cc6a7b87b
commit 35c126a10a
9 changed files with 60 additions and 42 deletions

View File

@@ -32,7 +32,7 @@ switchEditors = {
content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>');
// Mark </p> if it has any attributes.
content = content.replace(new RegExp('(<p[^>]+>.*?)</p>', 'mg'), '$1</p#>');
content = content.replace(new RegExp('(<p [^>]+>.*?)</p>', 'mg'), '$1</p#>');
// Sepatate <div> containing <p>
content = content.replace(new RegExp('<div([^>]*)>\\s*<p>', 'mgi'), '<div$1>\n\n');
@@ -59,7 +59,7 @@ switchEditors = {
// Unmark special paragraph closing tags
content = content.replace(new RegExp('</p#>', 'g'), '</p>\n');
content = content.replace(new RegExp('\\s*(<p[^>]+>.*</p>)', 'mg'), '\n$1');
content = content.replace(new RegExp('\\s*(<p [^>]+>.*</p>)', 'mg'), '\n$1');
// Trim whitespace
content = content.replace(new RegExp('^\\s*', ''), '');