From baa3c6f01a788f649a987af847d3bb29672513a5 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 25 Aug 2008 15:18:15 +0000 Subject: [PATCH] fixed: Server side spell checker errors when checking text with single quotes --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Operation/SpellCheck.pm | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d3f137c51..1ce32a3a3 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.6.0 + - fixed: Server side spell checker errors when checking text with single quotes - remove Do Nothing On Delete workflow and allow none to be selected for on delete etc workflow - remove remnants of realtime workflow selection code - fixed: Asset view time format problem diff --git a/lib/WebGUI/Operation/SpellCheck.pm b/lib/WebGUI/Operation/SpellCheck.pm index 1ed056918..398d796bd 100644 --- a/lib/WebGUI/Operation/SpellCheck.pm +++ b/lib/WebGUI/Operation/SpellCheck.pm @@ -196,6 +196,10 @@ sub www_spellCheck { while ($session->request->read(my $buffer, 1024)) { $data .= $buffer; } + + # work around TinyMCE JSON encoding bug + $data =~ s/([^\\](?:\\\\)*)\\'/$1'/g; + my $params = JSON->new->utf8->decode($data); my $result;