Commit e313d2be authored by Nigel McNie's avatar Nigel McNie
Browse files

Make HTML export work again after TinyMCE upgrade.

Smilies are now in a different directory. Also, TinyMCE seems to be
putting some attributes before the src tag, so match for that too.
parent 0cdc1ca3
...@@ -380,7 +380,7 @@ class PluginExportHtml extends PluginExport { ...@@ -380,7 +380,7 @@ class PluginExportHtml extends PluginExport {
} }
// Smilies // Smilies
$directoriestocopy[get_config('docroot') . 'js/tinymce/plugins/emotions/images'] = $staticdir . 'smilies/'; $directoriestocopy[get_config('docroot') . 'js/tinymce/plugins/emotions/img'] = $staticdir . 'smilies/';
$filestocopy = array( $filestocopy = array(
get_config('docroot') . 'theme/views.css' => $staticdir . 'views.css', get_config('docroot') . 'theme/views.css' => $staticdir . 'views.css',
...@@ -481,7 +481,7 @@ class HtmlExportOutputFilter { ...@@ -481,7 +481,7 @@ class HtmlExportOutputFilter {
// We don't care about javascript // We don't care about javascript
'#<script[^>]*>.*?</script>#si', '#<script[^>]*>.*?</script>#si',
// Fix simlies from tinymce // Fix simlies from tinymce
'#<img src="(' . $wwwroot . ')?/?js/tinymce/plugins/emotions/images/([^"]+)"([^>]+)>#', '#<img ([^>]*)src="(' . $wwwroot . ')?/?js/tinymce/plugins/emotions/img/([^"]+)"([^>]+)>#',
// No forms // No forms
'#<form[^>]*>.*?</form>#si', '#<form[^>]*>.*?</form>#si',
// Gratuitous hack for the RSS blocktype // Gratuitous hack for the RSS blocktype
...@@ -489,7 +489,7 @@ class HtmlExportOutputFilter { ...@@ -489,7 +489,7 @@ class HtmlExportOutputFilter {
), ),
array( array(
'', '',
'<img src="' . $this->basepath . '/static/smilies/$2"$3>', '<img $1src="' . $this->basepath . '/static/smilies/$3"$4>',
'', '',
'', '',
), ),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment