[pmwiki-users] markup for endash conversion

adam overton a at plus1plus1plus.org
Tue Jan 25 02:38:48 CST 2011

hi petko
thanks for testing and the response.
not sure yet what the problem is on my end, so i need to do more testing. doesn't seem to be browser or mail-app related. i think the problem might exist in some code i've written for an "rsvp" link – a PageVar i've defined {$rsvp} that references a couple PTVs on the same page that contain the offending endashes. i'm now thinking i should perhaps just try and do the conversion there in my function instead of via markup on the entire page...
anyways, thanks for the tips!

On 24 Jan 2011, at 5:56 PM, Petko Yotov wrote:

> 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.
> Petko

More information about the pmwiki-users mailing list