[Project_owners] regex help to lowercase (X)HTML tags needed

Roan Horning Roan at Horning.us
Wed Apr 19 12:35:58 EDT 2006


Hi,

Not a regex solution, but should safely do what you need:

http://tidy.sourceforge.net/

Roan


HJ wrote:
> Hi,
>
> I need to replace all upper case tags and attributes in XHTML (think 
> XMLHttpRequest) with .replace() but I have no idea *if* that is even 
> possible, or how to make it work (:
>
> Example:
>
> <IMG SRC="http[s]://foo.bar.com/UPPERCASElowercase.png"/>
>
> should become:
>
> <img src="http[s]://foo.bar.com/UPPERCASElowercase.png"/>
>
> and:
>
> <a HREF="http[s]://foo.bar.com/UPPERCASElowercase.png">link</A>
>
> should become:
>
> <a href="http[s]://foo.bar.com/UPPERCASElowercase.png">link</a>
>
> Do you have any suggestions for me?
> Anyone ever done something like this?
>
> Thank you for your time,
> /HJ
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
>



More information about the Project_owners mailing list