HTML Formatting in Table Descriptions

A place for users and developers of the Xataface to discuss and receive support.

HTML Formatting in Table Descriptions

Postby andperry » Tue Aug 16, 2011 2:57 am

I tend to use a verical table menu in most of my Xataface Applications. I sometimes use HTML formatting (line breaks and/or non-breaking spaces) to force the description of a table to break its lines at certain points in order to look neater. This has always worked well with Xataface 1.2, but doesn't seem to do so with Xataface 1.3. There is a tendency (though it doesn't seem to happen 100% of the time) for the leading ampersand of a non-breaking space and the angle brackets of a line break tag to be expanded into the HTML encodings for ampersand, "less than" and "greater than" repsectively. The table descriptions therefore do not render correctly on the page. Is there any way round this?

Many thanks,

Andrew Perry.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Re: HTML Formatting in Table Descriptions

Postby shannah » Tue Aug 16, 2011 9:33 am

Table names have been escaped in 1.3. Probably better to use CSS to enforce width on your menu rather than explicitly placing <br/> tags.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: HTML Formatting in Table Descriptions

Postby andperry » Wed Apr 11, 2012 6:39 am

That's fine about table names - it's only a minor issue, but I've just discovered a related issue that is of more concern.

I have a multilingual web site in which page content in stored in records with a separate field for each language. The widget labels in fields.ini contain HTML image links to small thumbnail images of the associated national flags. The result is quite impressive until I try updating Xataface to a later version in which the label text gets escaped in the same way as table names in conf.ini.

It would be a great shame if it is no longer possible to create this effect. Is there any way round it at all? I'm even willing to try and edit something in the Xataface code if someone can point me in the right direction.

Thanks,

Andrew.
andperry
 
Posts: 57
Joined: Wed Feb 18, 2009 9:20 am
Location: Wirral, UK

Re: HTML Formatting in Table Descriptions

Postby shannah » Wed Apr 11, 2012 10:36 am

There are a couple of workarounds I can think of:

1. You may be able to use blocks/slots to add the flag after the label.
2. You may be able to add the flags using CSS.
3. You may be able to add the flags using Javascript.

Alternatively I suppose we could add some sort of config option to enable/disable escaping of labels and descriptions.

As far as advice to remove the escaping, it depends on where the labels are displayed. The escaping generally happens in the template, using the smarty |escape function.

Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved