[ic] Quoting problems

Mike Heins mike at perusion.com
Mon May 24 16:29:18 EDT 2004


Quoting Daniel Davenport (ddavenport at newagedigital.com):
> A customer of ours sells items with different heights, widths, etc.  They
> specify the heights and widths with ' (for feet) and " (inches).  However,
> as you can imagine, these two characters horribly mess up the ITL tags,
> select boxes, and some of the javascript code.
> 
> I've tried setting an htmlentities filter for options in the meta editor,
> but that only escapes the ".  And of course, an option ends up going in as
> 36" instead of 36" .  If the options get edited again, it ends up being
> 36" .  That won't work.
> 
> So how do i let people put ' and " in without breaking their products?

You should be able to input those in the database without troubles.
The key is to filter the output so that it covers all contingencies.

Interchange provides the

	[jsq]Some funky quoted string's
             with "stuff" in them[/jsq]

tag for quoting javascript. It produces:

	"Some funky quoted string's" + ' with "stuff" in them'

In other situations you can use [filter entities].

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.647.1295  tollfree 800-949-1889 <mike at perusion.com>

"Laughter is inner jogging." -- Norman Cousins


More information about the interchange-users mailing list