amp()

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

amp()

Post by cmb » Sat Jul 02, 2011 1:47 pm

Hello developers,

I wonder if the usage of amp() is reasonable. & is a valid HTML entity. Souldn't it be recommended to use this for both XHTML and HTML compliant code. In most cases it might be simpler to write (and it spares the function call overhead). And I'm not sure if & is allowed for HTML5.

As I understand amp() was introduced by Peter Harteg as he introduced XHTML as alternative. As & is invalid in XHTML he had to cater for it.

The only advantage I found in using amp() instead of & is a slight decrease of the size of the HTTP response. Perhaps something to worry about ;)

So shouldn't it be recommended to best use & instead of amp(), and shall amp() be deprecated and tagged as such in the API documentation.

Any comments appreciated.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply