[ic] delimiter for tag parameters

Peter peter at pajamian.dhs.org
Tue Oct 25 20:07:02 EDT 2005


Two possibilities...

1.  Make your tag a container tag and pass the text in the body of the 
tag, ie:

[mytag][item-field title][/mytag]

2.  Use a filter to change the bad characters to something else, ie:
[mytag title="[filter urlencode][item-field title][/filter]"]

Then decode inside your tag with:

$opt->{title} =~ s/\%([0-9a-f]{2})/chr(hex($1))/ieg;

Peter


On 10/25/2005 04:40 PM, Ron Phipps wrote:
> I have a usertag that takes as parameters text from the product title
> field as well as other fields in the database.  I can't control what the
> users put in those fields and therefore the parameter delimiters like
> (', ", |) could be within the text.  If the delimiter I'm currently
> using when calling the tag using ITL is in the text then the call fails.
> How do other developers handle this issue?  For example:
> 
> The database field title could contain:
> 
> 1' by 5" plywood | treated
> 
> And if I call my tag like this:
> 
> [mytag title='[item-field title]']
> 
> IC displays:
> 
> [mytag title='1' by 5" plywood | treated']
> 
> Instead of actually calling the tag passing that text to the tag.  If I
> use ' " | as the delimiter it all results in the same problem because
> those characters show up in the title.  What are our choices for
> delimiter?  And how do other people handle this issue?
> 
> Thanks!
> -Ron
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
> 


More information about the interchange-users mailing list