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 {
}
// 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(
get_config('docroot') . 'theme/views.css' => $staticdir . 'views.css',
......@@ -481,7 +481,7 @@ class HtmlExportOutputFilter {
// We don't care about javascript
'#<script[^>]*>.*?</script>#si',
// Fix simlies from tinymce
'#<img src="(' . $wwwroot . ')?/?js/tinymce/plugins/emotions/images/([^"]+)"([^>]+)>#',
'#<img ([^>]*)src="(' . $wwwroot . ')?/?js/tinymce/plugins/emotions/img/([^"]+)"([^>]+)>#',
// No forms
'#<form[^>]*>.*?</form>#si',
// Gratuitous hack for the RSS blocktype
......@@ -489,7 +489,7 @@ class HtmlExportOutputFilter {
),
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