We've removed nearly all special tag properties, starting with multiarg (the ability to specify named attributes, now universal), going on to nocode (preventing descendants from rendering, now specified by the template's use of tag.source rather than tag.content), plain (escaping HTML inside, now specified by the template), and dynamic (evaluating as PHP, now replaced by Twig templates).

The last remaining property is selfclosing. It tells the parser that this tag should be closed immediately when encountered.

Here are the problems with that:

- a) It's got a tiny use-case - basically [hr], which isn't even a packaged default. Even the self-closing [img=SRC] has been replaced by the more popular [img]SRC[/img] syntax used everywhere else.
- b) It's badly documented in the filter tips. You need to look at the sample to see whether it's self-closing or not, which isn't even shown in the short tips.
- c) It makes parsing depend on the plugin used - toggle the property, and a text generates a different tree.

We could just ditch it, and require all tags to be closed properly.

We can even accept a "short" syntax a la XML - [tag/] is synonymous with [tag][/tag].

CommentFileSizeAuthor
#2 bigpatch.patch9.4 KBcburschka

Comments

cburschka created an issue. See original summary.

cburschka’s picture

Status: Active » Needs review
StatusFileSize
new9.4 KB

(Squashing a few unpushed code-style patches into this one, because I want to run them by the testbot without making an extra issue.)

cburschka’s picture

Status: Needs review » Fixed

And done.

  • cburschka committed 4c9e487 on 8.x-3.x
    Issue #2633282: Remove self-closing property.
    
    This property is now gone...

  • cburschka committed 4c9e487 on 9.x-1.x
    Issue #2633282: Remove self-closing property.
    
    This property is now gone...

  • cburschka committed 4c9e487 on 9.x-2.x
    Issue #2633282: Remove self-closing property.
    
    This property is now gone...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.