Re: Change case of HTML tags
| From: | Brady Mitchell | Date: | Wed, 19 Dec 2007 21:32:07 +0000 |
| Subject: | Re: Change case of HTML tags | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266122@lists.php.net to get a copy of this message | ||
If you're using PHP5, you can use the tidy functions -
http://us2.php.net/tidy. The default settings output html tags
in
lower-case. For tidy config settings, see
http://tidy.sourceforge.net/docs/quickref.html
Brady
On Dec 19, 2007 1:10 PM, Christoph Boget <christoph.boget@gmail.com> wrote:
> I've been looking through the docs but haven't found an internal function
> that does what I'm looking for. Perhaps I missed it? Or perhaps someone
> can point me in the right direction? I'm looking for a routine that will
> convert tags to lower case. For example, if I have
>
> <HTML>
> <HEAD>
> <TITLE>This is the Page Title</TITLE>
> </HEAD>
> <Body>
> Here is the Page Text
> </Body>
> </HTML>
>
> I want to convert only the tags to lower case. So <HTML> becomes <html> and
> so on; I don't want anything else touched. This may seem kind of silly but
> I'm working with an XMLDocument object in javascript and when I serialize it
> to string format, for some reason all the tags are made into uppercase. I'm
> taking the serialized string, posting it back to the server and using it on
> the back end. I figure that since I can make it so that the serialized
> string is lower case on the front end, perhaps I can convert it on the back.
>
> Any ideas/pointers?
>
> thnx,
> Christoph
>