Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-06-21 08:46:38

kurai
New Member
From: Genova
Registered: 2010-06-21
Posts: 1
Website

HTML 5 style self closing tags

Hi there,
is there a way (a plugin, a code hack, whatever) to have all the self-closing tag generated by Textpattern (i.e.: article images) display HTML 5 style? (like ‘>’ instead of ‘ />’).
My website is all HTML5-compliant, but old self-closing tags, though compatible, are not part of the standard.
Thanks for any advice!

Offline

#2 2010-06-21 09:37:19

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: HTML 5 style self closing tags

I’m not yet too sure about tag closing in HTML5 but you could give rah_replace a go.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2010-06-21 10:50:45

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: HTML 5 style self closing tags

uli wrote:

I’m not yet too sure about tag closing in HTML5

Self-closing in HTML5 is valid. They added self-closing to the specs so that moving to HTML5 could be easy as possible. Really, there is nothing wrong about using self-closing tags in HTML5. Actually imo it is pretty cool feature. If you wanted to start using the video canvas and such, as long as your markup is already strict valid, you can just change the doc type and you’re ready to use the canvases.

but you could give rah_replace a go.

Yep. Rah_replace can indeed do that :-) The slight problem with such solution is the performance, as the replacing happens on-fly.

Offline

#4 2010-06-21 10:54:10

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: HTML 5 style self closing tags

May be interesting to get an answer on html5 support in the feature request/development part of this forum, which the devs usually read. I too am creating a html5 site and whilst the self closing tags are not a major concern as they still validate, I’d like to see what plans (if any) are in place to support some of the newer tags and removing deprecated tags that Textpattern currently uses (such as acronym).

Of course html5 is still unratified by W3C and constantly in flux at the moment so maybe that will be their answer at this stage.

Offline

#5 2010-06-21 12:18:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,447
Website GitHub

Re: HTML 5 style self closing tags

html5 is still unratified by W3C and constantly in flux :-)

(but never rule anything out)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2010-06-21 12:27:10

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: HTML 5 style self closing tags

Bloke wrote:

but never rule anything out

Cool :-) In these situations it’s good that TXP has the htmlshortcut library. Lot easier to change. I’m wondering if simple setting to TXP’s preferences could be possible which then toggles the closing slash on and off in the tags. But on other hand self-closing HTML5 valid, soooo.

Offline

#7 2010-06-21 22:27:25

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: HTML 5 style self closing tags

I think jmd_html is what you’re looking for. it converts xhtml style self closing tags to html. -BTW You can use html5 with xhtml syntax (xhtml5).-+just noticed Jukka already adressed this point.+

Last edited by JanDW (2010-06-21 22:28:31)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#8 2010-06-22 15:21:40

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: HTML 5 style self closing tags

I’m wondering if simple setting to TXP’s preferences could be possible which then toggles the closing slash on and off in the tags.

I was thinking the same, a toggle for closing tags on or off would be a great option.

Offline

Board footer

Powered by FluxBB