Forum Moderators: open

Message Too Old, No Replies

Problem with Textarea and { Symbol

It's causing the page to not display.

         

TimmyMagic

2:23 pm on Oct 11, 2007 (gmt 0)

10+ Year Member



Hi,

I've been making some modification to a piece of software that works using smarty templates. I've edited a tpl file and added a couple of textareas. One textarea for CSS code and another for HTML code - for the visitor to copy and paste to their website.

However the page fails to display, and comes up blank. I finally narrowed this down to the { and } symbols in the CSS section. It also didn't like the HTML stuff but I added the < and > characters in their other way - &lt; &gt;

Does anyone know how to put the { symbols in the textarea correctly. Is there an alternative to it, like I did with the > character.

Thanks,

Tim

rocknbil

2:59 am on Oct 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't think there's an entity for those. If it's in a page, you can use the numeric entities:

&#123; = {
&#125; = }

But as CSS pasted into a form I'm not sure if that will work. in other words, you may get a style like this:

.mystyle &#123; font-weight:700; &#125;

In a query string, the hex equivalents are

%7B = {
%7D = }

Probably something the software is doing with those, not sure.

TimmyMagic

10:05 am on Oct 12, 2007 (gmt 0)

10+ Year Member



&#123; = {
&#125; = }

This is exactly what I needed to know. It now works.

Thanks.