Revision: 8945
http://languagetool.svn.sourceforge.net/languagetool/?rev=8945&view=rev
Author: dnaber
Date: 2013-01-10 22:53:07 +0000 (Thu, 10 Jan 2013)
Log Message:
-----------
online check: encoding fixes
Modified Paths:
--------------
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/server/proxy.php
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
Modified: trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
2013-01-10 21:12:47 UTC (rev 8944)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/demo.html
2013-01-10 22:53:07 UTC (rev 8945)
@@ -94,7 +94,7 @@
<option value="is-IS">Icelandic</option>
<option value="it">Italian</option>
<option value="ja-JP">Japanese</option>
- <option value="km-KM">Khmer</option>
+ <option value="km">Khmer</option>
<option value="lt-LT">Lithuanian</option>
<option value="ml-IN">Malayalam</option>
<option value="pl-PL">Polish</option>
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
===================================================================
---
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
2013-01-10 21:12:47 UTC (rev 8944)
+++
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin.js
2013-01-10 22:53:07 UTC (rev 8945)
@@ -155,12 +155,12 @@
else {
cssName = "hiddenGrammarError";
}
- // TODO: escape metaInfo!?
var delim = this.surrogateAttributeDelimiter;
var metaInfo = ruleId + delim + suggestion.description + delim +
suggestion.suggestions;
if (suggestion.moreinfo) {
metaInfo += delim + suggestion.moreinfo;
}
+ metaInfo = metaInfo.replace(/&/g, "&").replace(/</g,
"<").replace(/>/g, ">"); // escape HTML
newText = newText.substring(0, spanStart)
+ '<span ' + this.surrogateAttribute + '="' + metaInfo +
'" class="' + cssName + '">'
+ newText.substring(spanStart, spanEnd)
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/server/proxy.php
===================================================================
---
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/server/proxy.php
2013-01-10 21:12:47 UTC (rev 8944)
+++
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/server/proxy.php
2013-01-10 22:53:07 UTC (rev 8945)
@@ -4,7 +4,6 @@
error_reporting(E_ALL);
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$postText = trim(file_get_contents('php://input'));
- $postText = urldecode($postText);
$postText = html_entity_decode($postText, ENT_COMPAT | ENT_HTML401, "UTF-8");
$curl = curl_init();
Modified:
trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
===================================================================
--- trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
2013-01-10 21:12:47 UTC (rev 8944)
+++ trunk/website/www/online-check/tiny_mce/plugins/atd-tinymce/src/atd.core.js
2013-01-10 22:53:07 UTC (rev 8945)
@@ -155,12 +155,12 @@
else {
cssName = "hiddenGrammarError";
}
- // TODO: escape metaInfo!?
var delim = this.surrogateAttributeDelimiter;
var metaInfo = ruleId + delim + suggestion.description + delim +
suggestion.suggestions;
if (suggestion.moreinfo) {
metaInfo += delim + suggestion.moreinfo;
}
+ metaInfo = metaInfo.replace(/&/g, "&").replace(/</g,
"<").replace(/>/g, ">"); // escape HTML
newText = newText.substring(0, spanStart)
+ '<span ' + this.surrogateAttribute + '="' + metaInfo +
'" class="' + cssName + '">'
+ newText.substring(spanStart, spanEnd)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Languagetool-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-commits