summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAndy Clement2012-01-18 15:21:08 (EST)
committer Mark Macdonald2012-01-18 15:26:45 (EST)
commit73cfe5d78443452a996aaeb0f604c4441766813b (patch)
treeb2a242bd40bc010ef6fa63dc2df5c52f186c6a05
parent693078aef2b3716279b666b137f19a940e766f52 (diff)
downloadorg.eclipse.orion.client-73cfe5d78443452a996aaeb0f604c4441766813b.zip
org.eclipse.orion.client-73cfe5d78443452a996aaeb0f604c4441766813b.tar.gz
org.eclipse.orion.client-73cfe5d78443452a996aaeb0f604c4441766813b.tar.bz2
Bug 367639 - Squashed commit of the following:
commit e71d90d5459049c71de3aa30f5a5439ab219c859 Author: Andy Clement <aclement@vmware.com> Date: Wed Jan 18 10:57:53 2012 -0800 adding contributor section commit 762c694d777cb731dc4392e6358fe59f3318ad29 Author: Andy Clement <aclement@vmware.com> Date: Tue Jan 17 16:03:46 2012 -0800 Avoid infinite loop in jslint when encountering CDATA blocks commit 2391c2c6a6ccb294abff9c8426e60e85dc2e942a Author: Andy Clement <aclement@vmware.com> Date: Tue Jan 17 15:41:53 2012 -0800 avoid infinite loop for CDATA in HTML like data
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/jslintworker.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/jslintworker.js b/bundles/org.eclipse.orion.client.core/web/orion/jslintworker.js
index 848429a..ae076eb 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/jslintworker.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/jslintworker.js
@@ -6,6 +6,10 @@
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+ Contributors:
+ Douglas Crockford - original implementation
+ Andy Clement - Fix for bug#367639
+
See http://www.JSON.org/js.html
@@ -1690,7 +1694,7 @@ var JSLINT = (function () {
// token -- this is called by advance to get the next token.
token: function () {
- var b, c, captures, d, depth, high, i, l, low, q, t;
+ var b, c, ch, captures, d, depth, high, i, l, low, q, t;
function match(x) {
var r = x.exec(s), r1;
@@ -1866,7 +1870,10 @@ var JSLINT = (function () {
}
if (s) {
if (xmode === 'html') {
- return it('(error)', s.charAt(0));
+ ch = s.charAt(0);
+ // skip the problem character
+ s = s.substr(1);
+ return it('(error)', ch);
} else {
errorAt("Unexpected '{a}'.",
line, character, s.substr(0, 1));
@@ -6101,4 +6108,4 @@ onmessage = function (event) {
var resultMessage = JSON.stringify(JSLINT.data());
postMessage(resultMessage);
};
-*/ \ No newline at end of file
+*/