John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
One feature is a small blerb on the front page that the customer will change every so often, like once a month. A form supplies new content which is saved in a config file that my template pulls in; I got that working without any trouble.
The problem is that one of these items is not a single line but a larger "article", and the current content contains paragraphs and and bulleted list. So, I need to allow full HTML codes to be entered and passed through to the template.
Meanwhile, I'm serving XHTML if the browser accepts it, so a syntax error will break the page, not just "do something" like most of the web pages out there (including this one!).
Now this is a seldom-used Admin feature, not a BBS with this as a core feature. So I don't want to put too much work in it, except to reuse! I'm wondering how I might allow users to enter rich content but still ensure that I serve only well-formed XHTML.
Ideas include (1) validating the resulting page before committing the changes; (2) use a different sort of markup and transform it into XHTML. I think that's why the phpBB syntax was invented, in fact. Any Perl modules available that will help me do what I'm looking for?
Thanks,
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: User Input for Web Content
by Corion (Patriarch) on Apr 11, 2011 at 13:22 UTC | |
|
Re: User Input for Web Content
by ww (Archbishop) on Apr 11, 2011 at 16:39 UTC | |
|
Re: User Input for Web Content
by locked_user sundialsvc4 (Abbot) on Apr 11, 2011 at 15:45 UTC | |
|
Re: User Input for Web Content
by roboticus (Chancellor) on Apr 11, 2011 at 19:34 UTC |