Page 1 of 1
HTML Formatting in Table Descriptions
Posted:
Tue Aug 16, 2011 2:57 am
by andperry
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.
Re: HTML Formatting in Table Descriptions
Posted:
Tue Aug 16, 2011 9:33 am
by shannah
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.
Re: HTML Formatting in Table Descriptions
Posted:
Wed Apr 11, 2012 6:39 am
by andperry
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.
Re: HTML Formatting in Table Descriptions
Posted:
Wed Apr 11, 2012 10:36 am
by shannah
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