|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon May 12, 2003 6:14 pm Post subject: triple-quotes |
|
|
In config files, triple quotes allow not only multi-line configuration values, but also to have embedded double quotes.
Is it possible to get the same thing for function parameters?
ie.
{myfunc param="""Embedded quotes, both double (") and single(') ! """} |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon May 12, 2003 10:00 pm Post subject: |
|
|
we have \" to escape " in double quotes and \' to escape ' in single quotes. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon May 12, 2003 10:55 pm Post subject: |
|
|
Quote: | we have \" to escape " in double quotes and \' to escape ' in single quotes. |
Messju, I know -- that's why I made this a feature request |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon May 12, 2003 10:57 pm Post subject: |
|
|
i know it's a matter of taste, but for me the \-escape is beautiful, but the triple-quotes are ugly. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon May 12, 2003 11:51 pm Post subject: |
|
|
Hi Messju!
I think all escapements are ugly, really. But what are you gonna do?
I should have also pointed out that I would like this for literal modifiers, as well
In the particular case that I am trying to address, I want to embed long pieces of text that will be entered by people who are used to entering things like:
myfield1="mydata1 with embedded single quote's" myfield2="mydata2"
It will be much easier to get them to make the """ escapement at the begining and end of the text than have them insert a lot of \"'s which they are not used to doing. It also makes embedding things like HTML in parameters much more straightforward.
I think my big problem is that I'm not very good at coloring inside the lines. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|