You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2007/02/15 16:53:05 UTC
[jira] Resolved: (VELTOOLS-77) Inconsistency between display in
javascript and non-javascript error messages containing HTML
[ https://issues.apache.org/jira/browse/VELTOOLS-77?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna resolved VELTOOLS-77.
----------------------------------
Resolution: Won't Fix
Sounds like we're agreed that this isn't really needed.
Christopher, if you think this would be valuable to others, feel free to add a subclass that would do this to the contributed code area of the Wiki.
http://wiki.apache.org/velocity/VelocityTools
> Inconsistency between display in javascript and non-javascript error messages containing HTML
> ---------------------------------------------------------------------------------------------
>
> Key: VELTOOLS-77
> URL: https://issues.apache.org/jira/browse/VELTOOLS-77
> Project: Velocity Tools
> Issue Type: Bug
> Components: VelocityStruts
> Environment: Struts 1.3.5 / Velocity 1.4 / Velocity Tools 1.2
> Reporter: Christopher Schultz
> Priority: Trivial
> Attachments: VELTOOLS-77.diff
>
>
> When error messages contain HTML markup, the messages are displayed as expected by $error.getMsgs(fieldName), but not in javascript messages.
> Easy to demonstrate:
> 1. Start with typical struts/validator/velocity/velocity-tools setup
> 2. Modify stock error message "errors.required" from
> errors.required=The field {0} is required.
> to:
> errors.required=The field <i>{0}</i> is required.
> 3. Induce form rejection (required field) with javascript turned OFF
> Result: Error message is displayed with fieldname in italics.
> 4. Repeat form failure with javascript turned ON
> Result: Error message is displayed in javascript alert with unsightly <i> and </i> markup displayed. (Same problem occurs with more likely things such as HTML entities (i.e. &)).
> Expected: Markup removed?
> I realize that javascript popups are not generally expected to properly render markup. Perhaps error messages put into javascript validation could have markup removed. I also realize that this is a non-trivial fix and kind of a minefield. ;)
> Feel free to re-categorize this issue as something other than a "bug". I just figured that inconsistent behavior (IMO) called for "bug" status. Since I'm not offering a solution just yet, I didn't want to categorize it as an "improvement".
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org