You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <de...@velocity.apache.org> on 2010/10/27 17:50:24 UTC
[jira] Created: (VELOCITY-785) incensistencies when escaping quotes
by doubling them
incensistencies when escaping quotes by doubling them
-----------------------------------------------------
Key: VELOCITY-785
URL: https://issues.apache.org/jira/browse/VELOCITY-785
Project: Velocity
Issue Type: Bug
Components: Engine
Affects Versions: 2.0
Environment: any
Reporter: Claude Brisson
Priority: Minor
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
[jira] Updated: (VELOCITY-785) incensistencies when escaping quotes
by doubling them
Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Bubna updated VELOCITY-785:
----------------------------------
Issue Type: Improvement (was: Bug)
Funny, i would call that an unexpected consistency. :) I don't really have any problem with it the way it is, since it works and doesn't prevent any possible output. But i agree that there is unnecessary escaping going on, leaving room for improvement.
> 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
>
> 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
[jira] Resolved: (VELOCITY-785) incensistencies when escaping
quotes by doubling them
Posted by "Claude Brisson (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELOCITY-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson resolved VELOCITY-785.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.0
1.7
applied Jarkko patch.
> 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
> Fix For: 1.7, 2.0
>
> 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
[jira] Updated: (VELOCITY-785) incensistencies when escaping quotes
by doubling them
Posted by "Jarkko Viinamäki (JIRA)" <de...@velocity.apache.org>.
[ 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