You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "bernard (JIRA)" <ji...@apache.org> on 2011/06/06 11:36:59 UTC
[jira] [Created] (WICKET-3773) Onclick Script displayed as Link
Text
Onclick Script displayed as Link Text
-------------------------------------
Key: WICKET-3773
URL: https://issues.apache.org/jira/browse/WICKET-3773
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.4.17
Reporter: bernard
Wicket changes an anchor that has an onclick attribute in a way that breaks it:
<a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
becomes:
<a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andera Del Bene updated WICKET-3773:
------------------------------------
Attachment: valueAttributeCharsWithTest.txt
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044782#comment-13044782 ]
Martin Grigorov commented on WICKET-3773:
-----------------------------------------
That's why I didn't close the ticket :-)
Definitely there is something wrong producing such kind of html "attributes".
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-3773:
------------------------------------
Attachment: WICKET-3773.patch
Here is a patch that solves the problem for this ticket but breaks 4 other tests.
The problem is that an attribute value can have escaped quotes which will break the calculations.
E.g.
"<a href='b > a'>" will be parsed OK, but "<a href='b \' > a'>" will fail.
Have fun!
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andera Del Bene updated WICKET-3773:
------------------------------------
Attachment: cumulativePatch.txt
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch, cumulativePatch.txt, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044934#comment-13044934 ]
Andera Del Bene commented on WICKET-3773:
-----------------------------------------
The problem should be in class XmlPullParser which "blindly" searches for closing tag '<' without checking if this tag is inside a tag attribute (like onclick="...").
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Attila Király (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045023#comment-13045023 ]
Attila Király commented on WICKET-3773:
---------------------------------------
> is a valid character in an xml attribute value while < is not (needs to be escaped): http://www.w3.org/TR/xml/#NT-AttValue
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045335#comment-13045335 ]
bernard commented on WICKET-3773:
---------------------------------
I am not saying you shouldn't have fun, but I start to think I shouldn't have reported this :)
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044992#comment-13044992 ]
bernard commented on WICKET-3773:
---------------------------------
Thanks for pointing this out. Sure this will happen again. But is it worth fixing this from the performance perspective? Will a better parser be faster?
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081608#comment-13081608 ]
Andera Del Bene commented on WICKET-3773:
-----------------------------------------
I've improved code and test case. The cumulative patch 'cumulativePatch.txt' substitute the previous patch I've attached.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch, cumulativePatch.txt, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg updated WICKET-3773:
----------------------------------
Priority: Trivial (was: Major)
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080809#comment-13080809 ]
Martin Grigorov commented on WICKET-3773:
-----------------------------------------
Take into account the patch in WICKET-3951.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080927#comment-13080927 ]
Andera Del Bene commented on WICKET-3773:
-----------------------------------------
Hi,
in order evaluate patch from WICKET-3951 more easily, I moved code to FullyBufferedReader class and I created a test case for this class with escaped quotes.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045040#comment-13045040 ]
Igor Vaynberg commented on WICKET-3773:
---------------------------------------
in 1.4 we should add a warning when encountering this in raw markup, while in 1.5 we should try to escape automatically
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045011#comment-13045011 ]
Igor Vaynberg commented on WICKET-3773:
---------------------------------------
does the xml spec require > and < to be escaped inside a quoted attribute value?
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3773.
-------------------------------------
Resolution: Not A Problem
The problem is the "broken attributes" is that you use '>' in the attribute value.
Replacing it with > solves the problem.
Please provide a quickstart that demonstrates such invalid attribute value produced by Wicket and I'll reopen the ticket for you.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044766#comment-13044766 ]
Martin Grigorov commented on WICKET-3773:
-----------------------------------------
Wicket needs to "relativize" all relative links so they keep work in proxy enviroment.
Since your href is relative (href="google.com") it is confused that it should relativize it.
Use href="http://google.com" and everything is working again.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
bernard updated WICKET-3773:
----------------------------
Attachment: Quickstart.zip
Quick start
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13046769#comment-13046769 ]
Martin Grigorov commented on WICKET-3773:
-----------------------------------------
https://github.com/jhy/jsoup/blob/master/src/test/java/org/jsoup/parser/ParserTest.java#L34
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Andera Del Bene (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080935#comment-13080935 ]
Andera Del Bene commented on WICKET-3773:
-----------------------------------------
I've attached the new patch (valueAttributeCharsWithTest.txt) here...
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3773.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.5.1
Assignee: Igor Vaynberg
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.17
> Reporter: bernard
> Assignee: Igor Vaynberg
> Priority: Trivial
> Fix For: 1.5.1
>
> Attachments: Quickstart.zip, WICKET-3773.patch, cumulativePatch.txt, valueAttributeCharsWithTest.txt
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "bernard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044773#comment-13044773 ]
bernard commented on WICKET-3773:
---------------------------------
I get this in different scenarios, even with wicket links such as:
<h2><a wicket:id="backToListItem" onclick="if(history.length > 0){history.back();return false;}else{return true;}">Back</a></h2>
which renders as:
<h2><a onclick="" if="" history.length="" href="?wicket:interface=:3:backToListItem::ILinkListener::"> 0){history.back();return false;}else{return true;}">Back</a></h2>
I can't see a difference, and I don't know what confuses Wicket. Would it be possible to get Wicket to not get confused?
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg reopened WICKET-3773:
-----------------------------------
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Attachments: Quickstart.zip
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3773) Onclick Script displayed as Link
Text
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045331#comment-13045331 ]
Martin Grigorov commented on WICKET-3773:
-----------------------------------------
I think there is no need to log warnings or escape the value. If the parser can properly parse it then there is no need to do anything else.
> Onclick Script displayed as Link Text
> -------------------------------------
>
> Key: WICKET-3773
> URL: https://issues.apache.org/jira/browse/WICKET-3773
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: bernard
> Priority: Trivial
> Attachments: Quickstart.zip, WICKET-3773.patch
>
>
> Wicket changes an anchor that has an onclick attribute in a way that breaks it:
> <a href="google.com" onclick="if(history.length > 1){history.back();return false;}else{return true;}">Back to Google</a>
> becomes:
> <a href="google.com" onclick="" if="" history.length=""> 1){history.back();return false;}else{return true;}">Back to Google</a>
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira