diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-21 16:26:29 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-10-21 16:26:29 +0200 |
commit | 6769436f3b43074d7d5895b36927eddf37b0ba8d (patch) | |
tree | f13fda79c9b55009672bdd8b3cff0746bf8788a2 /library/tinymce/jscripts/tiny_mce | |
parent | 01164c8c2f802f0b4c2f0f7c4a83ed826768ae1a (diff) | |
download | volse-hubzilla-6769436f3b43074d7d5895b36927eddf37b0ba8d.tar.gz volse-hubzilla-6769436f3b43074d7d5895b36927eddf37b0ba8d.tar.bz2 volse-hubzilla-6769436f3b43074d7d5895b36927eddf37b0ba8d.zip |
oembed. fix html2bbcode when oembed html contains span and utf8 chars
Diffstat (limited to 'library/tinymce/jscripts/tiny_mce')
-rw-r--r-- | library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js | 17 |
1 files changed, 11 insertions, 6 deletions
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 +})();
|