diff options
Diffstat (limited to 'library')
-rw-r--r-- | library/HTML5/TreeBuilder.php | 2 | ||||
-rw-r--r-- | library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/library/HTML5/TreeBuilder.php b/library/HTML5/TreeBuilder.php index 03e2ee77f..a64816f56 100644 --- a/library/HTML5/TreeBuilder.php +++ b/library/HTML5/TreeBuilder.php @@ -3041,6 +3041,8 @@ class HTML5_TreeBuilder { if (!empty($token['attr'])) { foreach($token['attr'] as $attr) { + // mike@macgirvin.com 2011-10-21, stray double quotes cause everything to abort + $attr['name'] = str_replace('"','',$attr['name']); if(!$el->hasAttribute($attr['name'])) { $el->setAttribute($attr['name'], $attr['value']); } diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js index 789e75c39..9e680e104 100644 --- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js @@ -53,19 +53,24 @@ /* oembed */ function _h2b_cb(match) { - text = bin2hex(match); function s_h2b(data) { match = data; - } - $.ajax({ - url: 'oembed/h2b?text=' + text, + }
+ $.ajax({
+ type:"POST", + url: 'oembed/h2b',
+ data: {text: match}, async: false, success: s_h2b, dataType: 'html' }); return match; } - s = s.replace(/<span class=\"oembed(.*?)<\/span>/gi, _h2b_cb); + if (s.indexOf('class="oembed')>=0){
+ //alert("request oembed html2bbcode");
+ s = _h2b_cb(s);
+ }
+ /* /oembed */ @@ -154,4 +159,4 @@ // Register plugin
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
-})();
\ No newline at end of file +})();
|