4 ms·
I am not here to defend php (Okay, I guess I am...) but the form <?= htmlentities($name) ?> is a lot better... We have to have an i18n layer anyway for all ou
by owyn 16y ago
I am not here to defend php (Okay, I guess I am...) but the form
<?= htmlentities($name) ?> is a lot better...
We have to have an i18n layer anyway for all output so it ends up being a lot of <?= Msg('message-name') ?> calls. Use some code gen macros and it's tolerable.
Also, XHP seems pretty rad. It gives me ideas. :)
- pornel 16y ago`htmlentities()` defaults to ISO-8859-1 encoding, so the short form is useless in practice, and you need: <?= htmlentities($name, ENT_QUOTES, 'UTF-8'); ?>