[
https://issues.jboss.org/browse/JBIDE-10438?page=com.atlassian.jira.plugi...
]
henk de boer edited comment on JBIDE-10438 at 12/9/11 7:06 PM:
---------------------------------------------------------------
Investigating the html page a little bit further, I found that the following smaller page
still causes the hang:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
while (i < clen) {
}
return null;
}
</script>
</body>
</html>
{code}
However, the following does not hang:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
while (i < clen) {
}
return null;
}
</script>
{code}
And neither does this:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
return null;
}
</script>
</body>
</html>
{code}
So it seems to be a combination between the while loop (which contains the XHTML reserved
{{<}}) and the head tag, as the following also does not hang:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
while (i = clen) {
}
return null;
}
</script>
</body>
</html>
{code}
was (Author: henk53):
Investigating the html page a little bit further, I found that the following smaller
page still causes the hang:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
while (i < clen) {
}
return null;
}
</script>
</body>
</html>
{code}
However, the following does not hang:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
while (i < clen) {
}
return null;
}
</script>
{code}
And neither does this:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
return null;
}
</script>
</body>
</html>
{code}
So it seems to be a combination between the while loop (which contains the XHTML reserved
{{<}}) and the head tag.
XHTML Validator hangs eclipse
-----------------------------
Key: JBIDE-10438
URL:
https://issues.jboss.org/browse/JBIDE-10438
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: jsp/jsf/xml source editing
Affects Versions: 3.3.0.M4
Reporter: Alexey Kazakov
Assignee: Victor Rubezhny
Priority: Blocker
Fix For: 3.3.0.M5, 3.3.0.Beta1
Create the following html and build the project:
{code}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>some title</title>
</head>
<body>
<h2>some heading.</h2>
SOME TEST!!!!<br>
MORE TEXT
<script type="text/javascript" language="javascript" >
// A comment
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return document.cookie.substring(offset, endstr);
}
//comment
var xyz = GetCookie('xyz'); // Comments
var datum = new Date();
var d1 = datum.getTime().toString();
// comment "" bla
var d2 = "100";
// comment
var d3 = "dba";
// comment
var abc = 999;
// comment
function urlEncode (string) {
string = string.replace(/ /g, '+');
return escape(string);
}
// comment
// comment
if(cookie != "" && cookie != null ){
document.write("<img src=\"http://example.com./xxx?bla=" +
xyz + "&bar="+abc+"&d1=" +urlEncode(d1)+ "&d2="
+urlEncode(d2) +"&d3=" +urlEncode(d3)+"\" alt=\"\"
width=\"1\" height=\"1\" border=\"0\" >");
}
else {
var cookie = "kaz"
}
</script>
</body>
</html>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira