[pmwiki-users] allow apostrophe in $WikiTitle?

Patrick R. Michaud pmichaud at pobox.com
Thu Jul 5 16:11:25 CDT 2007


On Wed, Jun 27, 2007 at 05:49:33PM -0400, sti at pooq.com wrote:
> Anno wrote:
> >> On 6/27/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> 
> >>>   $WikiTitle = 'My Site&#039;s Name Here';
> > 
> > Probably also $WikiTitle = "My Site's Name Here";
> > 
> 
> When that trick won't work, you can also use the standard PHP method of
> slashing internal quotes:
> 
> $WikiTitle = 'He said "Its Bob\'s Site!"';

Sometimes the $WikiTitle appears in HTML attributes as well as normal
text.  For that reason I recommend using &#039; for quotation marks
in $WikiTitle instead of an actual quotation mark.  For example,
several skin templates do

    <img src='$PageLogoUrl' alt='$WikiTitle' border='0' />

and having a quotation mark directly in $WikiTitle will break the
alt= attribute.

Pm



More information about the pmwiki-users mailing list