You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Edvin Syse (JIRA)" <ji...@apache.org> on 2007/12/28 20:29:43 UTC

[jira] Created: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

RFE: Option to escape markup in AbstractChoice#appendOptionHtml
---------------------------------------------------------------

                 Key: WICKET-1246
                 URL: https://issues.apache.org/jira/browse/WICKET-1246
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
            Reporter: Edvin Syse
            Priority: Trivial


Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.

My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):

CharSequence escaped = Strings.escapeMarkup(display, false, true);

.. so that it cheks escapeOptionMarkup() before  escaping.

This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.

-- Edvin Syse


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

Posted by "Edvin Syse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edvin Syse updated WICKET-1246:
-------------------------------

          Description: 
Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.

My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):

CharSequence escaped = Strings.escapeMarkup(display, false, true);

.. so that it checks the escapeOptionMarkup value before  escaping.

This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.

-- Edvin Syse


  was:
Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.

My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):

CharSequence escaped = Strings.escapeMarkup(display, false, true);

.. so that it cheks escapeOptionMarkup() before  escaping.

This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.

-- Edvin Syse


    Affects Version/s: 1.3.0-rc2

> RFE: Option to escape markup in AbstractChoice#appendOptionHtml
> ---------------------------------------------------------------
>
>                 Key: WICKET-1246
>                 URL: https://issues.apache.org/jira/browse/WICKET-1246
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc2
>            Reporter: Edvin Syse
>            Priority: Trivial
>
> Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.
> My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):
> CharSequence escaped = Strings.escapeMarkup(display, false, true);
> .. so that it checks the escapeOptionMarkup value before  escaping.
> This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.
> -- Edvin Syse

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-1246:
-------------------------------------

    Assignee: Igor Vaynberg

> RFE: Option to escape markup in AbstractChoice#appendOptionHtml
> ---------------------------------------------------------------
>
>                 Key: WICKET-1246
>                 URL: https://issues.apache.org/jira/browse/WICKET-1246
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc2
>            Reporter: Edvin Syse
>            Assignee: Igor Vaynberg
>            Priority: Trivial
>
> Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.
> My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):
> CharSequence escaped = Strings.escapeMarkup(display, false, true);
> .. so that it checks the escapeOptionMarkup value before  escaping.
> This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.
> -- Edvin Syse

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556468#action_12556468 ] 

Igor Vaynberg commented on WICKET-1246:
---------------------------------------

only the value attribute is escaped always. the escaping of the actual option text can be controlled by overriding escapeOptionHtml or turned off by calling setoutputmarkupstrings(false)

so really do you need the value attribute of option not to be escaped? because when it is submitted it will be decoded... so it should be a noop

> RFE: Option to escape markup in AbstractChoice#appendOptionHtml
> ---------------------------------------------------------------
>
>                 Key: WICKET-1246
>                 URL: https://issues.apache.org/jira/browse/WICKET-1246
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc2
>            Reporter: Edvin Syse
>            Assignee: Igor Vaynberg
>            Priority: Trivial
>
> Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.
> My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):
> CharSequence escaped = Strings.escapeMarkup(display, false, true);
> .. so that it checks the escapeOptionMarkup value before  escaping.
> This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.
> -- Edvin Syse

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1246.
-----------------------------------

    Resolution: Invalid

> RFE: Option to escape markup in AbstractChoice#appendOptionHtml
> ---------------------------------------------------------------
>
>                 Key: WICKET-1246
>                 URL: https://issues.apache.org/jira/browse/WICKET-1246
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc2
>            Reporter: Edvin Syse
>            Assignee: Igor Vaynberg
>            Priority: Trivial
>
> Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.
> My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):
> CharSequence escaped = Strings.escapeMarkup(display, false, true);
> .. so that it checks the escapeOptionMarkup value before  escaping.
> This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.
> -- Edvin Syse

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1246) RFE: Option to escape markup in AbstractChoice#appendOptionHtml

Posted by "Edvin Syse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556522#action_12556522 ] 

Edvin Syse commented on WICKET-1246:
------------------------------------

Hi!

I'm sorry for waisting your time, I didn't know about the 
Component#setEscapeModelStrings() method. It does what I needed (to 
escape the body of the option) :)

-- Edvin



> RFE: Option to escape markup in AbstractChoice#appendOptionHtml
> ---------------------------------------------------------------
>
>                 Key: WICKET-1246
>                 URL: https://issues.apache.org/jira/browse/WICKET-1246
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-rc2
>            Reporter: Edvin Syse
>            Assignee: Igor Vaynberg
>            Priority: Trivial
>
> Today, all markup from the Choice-model is escaped in the appendOptionHtml method of AbstractChoice. This makes it hard to include raquo, copyright symbols etc to the option markup.
> My suggestion is to add a method called escapeOptionMarkup() to AbstractChoice, and let it return true by default. Then change the following line in appendOptionHtml (Line 395/Wicket 1.3-rc2):
> CharSequence escaped = Strings.escapeMarkup(display, false, true);
> .. so that it checks the escapeOptionMarkup value before  escaping.
> This would be completely non-intrusive to existing code, and make it easy to avoid escaping by overriding escapeOptionMarkup() when you need it.
> -- Edvin Syse

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.