You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Jarkko Viinamäki (JIRA)" <de...@velocity.apache.org> on 2010/11/06 18:52:09 UTC
[jira] Updated: (VELOCITY-785) incensistencies when escaping quotes
by doubling them
[ https://issues.apache.org/jira/browse/VELOCITY-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarkko Viinamäki updated VELOCITY-785:
--------------------------------------
Attachment: velocity-785.patch
Here's a patch that will modify Velocity to act as Claude suggested. I agree that it is more logical that way.
> incensistencies when escaping quotes by doubling them
> -----------------------------------------------------
>
> Key: VELOCITY-785
> URL: https://issues.apache.org/jira/browse/VELOCITY-785
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Affects Versions: 2.0
> Environment: any
> Reporter: Claude Brisson
> Priority: Minor
> Attachments: velocity-785.patch
>
>
> The template:
> #set($double_double = """") ## ok
> #set($single_single = '''') ## ok
> #set($double_single = "''") ## strange, equals "'"
> #set($single_double = '""') ## strange, equals '"'
> double_double = $double_double
> single_single = $single_single
> double_single = $double_single
> single_double = $single_double
> renders as:
> "
> '
> '
> "
> whereas one would expect:
> "
> '
> ''
> ""
> More readily, one would expect single quotes doubling mechanism and double quotes doubling mechanism to only be active inside single quotes and double quotes, respectively.
--
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