Re: MHonArc and PHP (for <TITLE> Generation)

2000-02-04 01:28:29
On February 3, 2000 at 09:42, Peter Losher wrote:

The organization that I do some work under has a extensive MHonArc mail
archive for their mail archives.  Now all of this is written to use their 
PHP includes (for HTML formating purposes).  One slight problem - in these
archives, we use the message subject as part of the HTML title (using the
$SUBJECTNA variable).  Normally this works great - EXCEPT when the message
subject has quotes ("), then PHP is unable to parse it, because it ends up
looking like:

<?php $title="How Does "this" work"; ?>

Is there any way to have MHonArc parse out the (")'s in the subject before
generating that PHP statement?  (I have been doing them by hand in the

You can use the SUBJECTSTRIPCODE resource to rewriting of
the raw subject text:


This deletes any quotes.

Note, I could modify MHonArc code to translate " to &quot;.  This
seems like a safe thing to do and avoids HTML quoting problems.
All that is needed is to modify htmlize() and entify() in
This would be better than stripping out the quotes.


P.S.  You may consider using SUBJECTSTRIPCODE to translate
"'s to &quot;.  This will not work, since MHonArc will then
convert the & to &amp; when printing to a page.