Avoids an error that causes an alert popup when expanding cuts with 
certain text.

        Patch by fu. 

diffs (14 lines):

diff -r 982f34c834a0 -r fa561230eac7 cgi-bin/DW/Controller/CutExpander.pm
--- a/cgi-bin/DW/Controller/CutExpander.pm      Wed Jun 09 17:15:14 2010 +0000
+++ b/cgi-bin/DW/Controller/CutExpander.pm      Thu Jun 10 01:22:12 2010 +0800
@@ -58,6 +58,10 @@ sub cutexpander_handler {
         # make sure the user can read the entry
         if ( $entry->visible_to( $remote ) ) {
             my $text = load_cuttext( $entry, $remote, $args->{cutid} );
+            # FIXME: temporary fix.
+            # remove some unicode characters that could cause the returned 
JSON to break
+            # like in LJ::ejs, but we don't need to escape quotes, etc 
(objToJson does that)
+            $text =~ s/\xE2\x80[\xA8\xA9]//gs;
             $r->print( objToJson( { text => $text } ) );
             return $r->OK;
         }
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to