Re: MHonArc and PHP (for Generation)</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=mhonarc@ncsa.uiuc.edu&q=from:%22Peter+Losher%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Peter Losher</span></span></a></span> <span class="date"><a href="/search?l=mhonarc@ncsa.uiuc.edu&q=date:20000203" rel="nofollow">Thu, 3 Feb 2000 19:34:25 -0800</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <PRE> On Thu, 3 Feb 2000, John Hogan wrote: > I'd use the 'AddSlashes()' function before the variable is passed to the > <title> tag (Thanks also to Nathaniel for his suggestion) John - thanks for the suggestion, however, how can PHP add the slashes in? Example: In my MHonArc .rc file, I have: -=- <MsgPgBegin> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN"> <?php $$title = "$SUBJECTNA$ - ML Archive"; ?> <?php $$slash_title = addslashes("$title");?> <?php include("head.include") ?> </MsgPgBegin> -=- Now, the problem lies in that when PHP sees that $title variable in the generated message file, it barfs since it can't parse it. I can't stick the addslashes function in before that line, since I would be modifying a variable that hadn't been defined yet (and would then croke with a parsing error on the following line). What I would suggest is that MHonArc have the ability to take the "$SUBJECTNA$" variable, and either escape the (") or better yet, convert them to &quot; , similar to PHP's htmlspecialchars function, which can be found at: <A HREF="http://www.php.net/manual/function.htmlspecialchars.php3">http://www.php.net/manual/function.htmlspecialchars.php3</A> If there already is such a function in MHonArc, let me know. I really would like to have the Subject of a message to be a part of the title of the generated HTML that MHonArc produces. (helps with searching thru the Mail Archives with a search engine, etc.) Thanks! - Peter --- Peter Losher <[EMAIL PROTECTED]> Systems Admin. - Nominum, Inc. PGP key available on request </PRE> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg01659.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="thrd7.html#01661">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="mail7.html#01661">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg01667.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg01657.html">MHonArc and PHP (for <TITLE> Generation)</a></span> <span class="sender italic">Peter Losher</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg01658.html">Re: MHonArc and PHP (for <TITLE> Generation)</a></span> <span class="sender italic">Nathaniel Irons</span></li> <li class="icons-email"><span class="subject"><a href="msg01659.html">Re: MHonArc and PHP (for <TITLE> Generation)</a></span> <span class="sender italic">John Hogan</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg01667.html">Re: MHonArc and PHP (for <TITLE> Generation...</a></span> <span class="sender italic">Peter Losher</span></li> </ul></li> <li class="icons-email"><span class="subject"><a href="msg01667.html">Re: MHonArc and PHP (for <TITLE> Generation)</a></span> <span class="sender italic">Earl Hood</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg01669.html">Re: MHonArc and PHP (for <TITLE> Generation...</a></span> <span class="sender italic">Peter Losher</span></li> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="Re: MHonArc and PHP (for <TITLE> Generation)"> <input type="hidden" name="msgid" value="Pine.BSF.4.21.0002031736170.28388-100000@svalbard.nominum.com"> <input type="hidden" name="relpath" value="mhonarc@ncsa.uiuc.edu/msg01661.html"> <input type="submit" value=" Peter Losher "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="mhonarc@ncsa.uiuc.edu"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search mhonarc"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/mhonarc@ncsa.uiuc.edu/">mhonarc - all messages</a></li> <li class="icons-about"><a href="/mhonarc@ncsa.uiuc.edu/info.html">mhonarc - about the list</a></li> <li class="icons-expand"><a href="/search?l=mhonarc@ncsa.uiuc.edu&q=subject:%22Re%5C%3A+MHonArc+and+PHP+%5C%28for+%3CTITLE%3E+Generation%5C%29%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg01659.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg01667.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">Pine.BSF.4.21.0002031736170.28388-100000@svalbard.nominum.com</li> </ul> </div> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9b6c27781baddcf3',t:'MTc2NzIwOTAzNQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>