Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 1.7Beta1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:ANY
-
ICEsoft Forum Reference:
-
Workaround Exists:Yes
-
Workaround Description:put ice:outputText inside <a>
Description
An empty <a> with href="#" on the page will rendered the following page content inside another <a>. e.g:
<a href="#"></a>
<h2>hello</h2>
will be rendered as:
<a href="#"></a>
<h2><a href="#">hello</a></h2>
------------
Might be a more general issue:
On some pages appeared suddenly links where always have been text before.
Our finding is that if you have <p>Some text</p> in your xhtml pages it is rendered to <p><a href="">Some text</a></p> in the output.
<a href="#"></a>
<h2>hello</h2>
will be rendered as:
<a href="#"></a>
<h2><a href="#">hello</a></h2>
------------
Might be a more general issue:
On some pages appeared suddenly links where always have been text before.
Our finding is that if you have <p>Some text</p> in your xhtml pages it is rendered to <p><a href="">Some text</a></p> in the output.
The previous implementation used
private static String TAGS_THAT_CAN_CLOSE_SHORT =
"img, input, br, hr, meta, base, link, frame, col, area";
together with the boolean
TAGS_THAT_CAN_CLOSE_SHORT.indexOf(nodeName) > -1
But this does not accurately test wether the nodeName is in the list. In particular, "a" appears in "base" although "a" is not explicitly listed. The fix uses a HashSet of nodenames and HashSet.contains().