From: Carsten K. <car...@us...> - 2002-10-29 04:37:17
|
Hi Jeff, A global sounds fine by me. I had been thinking about a more generic entity function, something like html::entity(entityname, $repetitions = 1) but I can't see any real use for that. A global $NBSP might be handy in templates and it's shorter to type out than HTML::nbsp(). Not sure where a good place is to insert a global declaration of $NBSP, back in HtmlElement.php where the constant was? Carsten --- HtmlElement.php 17 Sep 2002 02:35:31 -0000 1.25 @@ -75,9 +75,16 @@ function HTML (/* $content, ... */) { } -define('NBSP', "\xA0"); // iso-8859-x non-breaking space. +global $NBSP = new RawXML(" "); On Monday, October 28, 2002, at 08:44 pm, Jeff Dairiki wrote: >> (Maybe this should just always output an html entity? We currently >> use a >> raw "\xA0" character for iso-8859-1 so this value was left as is.) > > IIRC, I introduced the '\xA0' as a hack so that NBSP could be defined > as a constant. Since that doesn't work anymore, I think always using > the entity is the way to go. > > An alternative to the nbsp() function would be a $NBSP global. > I'm not sure which is the better of those two choices. (Using a > function to generate a constant could be confusing.) > |