[pmwiki-users] markup for endash conversion

Petko Yotov 5ko at 5ko.fr
Mon Jan 24 19:56:28 CST 2011

On Tuesday 25 January 2011 01:16:10, adam overton wrote :
> i'm finding that in specific situations, i'd like to have my endashes (–)
> converted to their appropriate ascii code (they break, for instance, when
> placing them into email subject headers via ?subject=...–...), but the
> custom markup i'm using doesn't seem to have any effect no matter where i
> locate it in the translation process. here's what i'm using:
> $endashCode = "–";
> Markup("endash code", "<inline", "/–/", $endashCode);

The above works for me: I can see in the HTML source that it converts "–" to 
"–". But then, it may be a browser issue, Firefox works fine, but some 
browsers may think of the first "&" as a delimiter for URL parameters, instead 
of an HTML entity.

Note that if I don't convert endashes to – but still use "–", PmWiki 
encodes the e-mail subject correctly, so that browsers should not have 
problems with breaking the subject. 

Both work fine for me. From your question I have the feeling that somehow you 
already have your dashes converted to entities (another recipe?) or that your 
e-mail program doesn't understand the encoding of the subject.

If nothing helps, you can still use regular dashes (minus sign) instead of 
special characters for the e-mail subject.


More information about the pmwiki-users mailing list