Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 Yesterday 12:36:50

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,869
Website GitHub

Re: remove trailing slashes

phiw13 wrote #339536:

PS – If memory serves there used to be a plugin to remove the slashes and generate valid HTML4 markup. That was along time ago in the early life of Textpattern. Lights a candle anyone?

Well, if I’ve identified all instances, it’ll only affect the tags I mentioned above. One could try adding trim="#<br\s?\/>#" replace="<br>" (or something along those lines) to those tags, or wrap them in txp:evaluate with those attributes.


TXP Builders – finely-crafted code, design and txp

Offline

#14 Yesterday 12:59:16

etc
Developer
Registered: 2010-11-11
Posts: 5,360
Website GitHub

Re: remove trailing slashes

Unfortunately, this also affects any tag generated (by core or plugin) via tag() and tag_void() functions. And how browsers will react to a void <customtag>, dunno. On the other hand, <customtag /> allows no ambiguity.

The closing slash is optional, but not invalid in html5, whatever ‘validators’ claim.

Offline

#15 Yesterday 13:03:29

etc
Developer
Registered: 2010-11-11
Posts: 5,360
Website GitHub

Re: remove trailing slashes

jakob wrote #339530:

For 1, might the parsers catch up at some point?

I’m waiting for this more than 10 years already, but libxml2 used in php does not seem to support html5, even in ‘html’ mode. I might be wrong, though, haven’t checked it recently.

Offline

Board footer

Powered by FluxBB