[Pmwiki-users] Smart Quotes

John Rankin john.rankin at affinity.co.nz
Tue May 27 16:17:14 CDT 2003


Hello everyone

One of my users asked about PmWiki support for smart quotes. My initial =
reply was to say an author can use the 4 HTML entities for left and right =
single and double quotes, but that this would reduce the readability of pag=
e content for others wishing to update a page. At which point he repeated =
his question, with an emphasis on the word 'smart'.

So I wrote a short php script that automatically turns single and double =
quotes into left and right quotes. This raised 3 questions:
- are there any bad side-effects of doing global quote substitution, eg =
are there places where it will incorrectly pick up quotes around HTML =
attribute values
- are there times when an author will want to over-ride smart quotes and =
leave them straight, and if so, what should the mark-up be
- what about cases like '90s where the quote should be a right single to =
indicate omitted characters; I solved this using ` (back tick) as an =
escape character, so an author writes `'90s

And my user is right -- it makes pages look much classier.

Comments welcome.
--=20
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz






More information about the pmwiki-users mailing list