G Tellez wrote:
Hi all,

I'm wondering if someone has worked with HTML stored in the database.

Hi Gabriel,

Good question. This is going to be difficult to do with Links as it stands. It's presently designed to allow injecting only *strings* into HTML, and not injecting other HTML. The best you could do (at least on a moment's thought) is to store a representation of the HTML, which gets programmatically converted to Links-syntax HTML at runtime by a function that you'd have to write; it would be non-trivial.

To allow injecting HTML directly, we'd need another syntax in order to allow both injections. Also it would eviscerate the sometime goal we've had of being able to do XHTML validation, since the data from the database could be anything, including invalid XHTML.

Still, the feature is vital for some uses, so it would be nice to have it, perhaps in a separate ("unsafe"?) mode of Links. What do others think?

Ezra


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
links-users mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/links-users

Reply via email to