Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

triple-quotes

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon May 12, 2003 6:14 pm    Post subject: triple-quotes Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon May 12, 2003 10:00 pm    Post subject: Reply with quote

we have \" to escape " in double quotes and \' to escape ' in single quotes.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon May 12, 2003 10:55 pm    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon May 12, 2003 10:57 pm    Post subject: Reply with quote

i know it's a matter of taste, but for me the \-escape is beautiful, but the triple-quotes are ugly.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon May 12, 2003 11:51 pm    Post subject: Reply with quote

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 Wink

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP