You can try as long as you want - as long as you serving XHTML as text/
html, from the browsers point of view (e.g. its parser) it's HTML it's
dealing with, thus it'll remove those slashes internally.

Have you ever wondered why in Firefox' source code view those slashes
are marked red (as in error)? Technically it's still HTML with some
weird slashes where they do not belong. You'd have to serve XHTML as
application/xhtml+xml to change the browser's parser.

That said, you shouldn't waste your time regexing slashes. And instead
go back to HTML 4.01 maybe.

--Klaus



On 5 Feb., 16:03, dantan <hattin...@gmail.com> wrote:
> I am trying to parse the html out of a specific div to save it with
> php into a SQL-database.
>
> Working good so far.
> The html is valid xhtml, but html() makes <br> instead of <br /> and
> <img......> instead of <img...../>
>
> Is there a workaround to get the xhtml?

Reply via email to