fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-04-22 10:12 am

[dw-free] RTE + user tags in Safari, Opera, Chrome has issues. Text after the user tag gets put into

[commit: http://hg.dwscoalition.org/dw-free/rev/516346bc07fe]

http://bugs.dwscoalition.org/show_bug.cgi?id=2542

Fix issue with RTE + user tags, by adding a space after the user tag in the
same step as you add the user tag (otherwise, the RTE HTML parser gets
confused, and insists on still putting the space/any further text inside one
of the outer layers of the user tag)

Patch by LiveJournal, packaged for Dreamwidth by [personal profile] fu.

Files modified:
  • htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
--------------------------------------------------------------------------------
diff -r efdabfbecf0c -r 516346bc07fe htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js
--- a/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	Wed Apr 21 21:41:53 2010 -0500
+++ b/htdocs/stc/fck/editor/plugins/livejournal/fckplugin.js	Thu Apr 22 03:17:04 2010 -0700
@@ -63,15 +63,13 @@ LJUserCommand.Execute=function() {
             data.ljuser = data.ljuser.replace(/<\/span>/,'</div>');
             UserTagCache[username + "_" + site] = data.ljuser;
 
-            FCK.InsertHtml(data.ljuser);
-            FCK.InsertHtml('&nbsp;')
+            FCK.InsertHtml(data.ljuser + "&nbsp;");
             if (selection != '') FCKSelection.Collapse();
             FCK.Focus();
         }
     
         if ( UserTagCache[postData.username+"_"+postData.site] ) {
-            FCK.InsertHtml(UserTagCache[postData.username+"_"+postData.site]);
-            FCK.InsertHtml('&nbsp;')
+            FCK.InsertHtml(UserTagCache[postData.username+"_"+postData.site] + "&nbsp;");
             if (selection != '') FCKSelection.Collapse();
             FCK.Focus();
         } else {
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org