Re: Bug #9766 [Opn]: Slashes are removed

From: Date: Fri, 12 Jan 2007 18:46:46 +0000
Subject: Re: Bug #9766 [Opn]: Slashes are removed
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-4152@lists.php.net to get a copy of this message
Hi Jan, It maybe that the issue is somewhere else in your app, maybe with your blogging tool (is it Wordpress?). I know I have the same issue when using Wordpress, maybe it's playing with the slashes. Trying a simple example in a separate file works fine for me: require_once 'Text/Highlighter.php'; require_once 'Text/Highlighter/Renderer/Html.php'; $renderer =& new Text_Highlighter_Renderer_HTML($options); $highlighter =& Text_Highlighter::factory('php'); $highlighter->setRenderer($renderer); $result = $highlighter->highlight('<?php echo "\n"; ?>'); I usually highlight code using http://hiliteme.com and then paste the result in Wordpress. On hiliteme.com it's all fine, you can test yourself, then when pasting in WP and saving, the slash disappears. Best, Stoyan On 12 Jan 2007 14:55:26 -0000, jan at ivtaco dot se <pear-qa@lists.php.net> wrote:
Edit report at http://pear.php.net/bugs/bug.php?id=9766&edit=1
 ID:               9766
User updated by: jan at ivtaco dot se
 Reported By:      jan at ivtaco dot se
 Status:           Open
 Type:             Bug
 Package:          Text_Highlighter
Operating System: irreleveant Package Version: 0.6.9
 PHP Version:      Irrelevant
New Comment: Example: http://www.bolmeson.se/2007/01/08/svenska-tecken-i-utskrift-i-c/ Previous Comments: ------------------------------------------------------------------------ [2007-01-08 07:18:35] jan at ivtaco dot se Description: ------------ Hi, My Highlighter seem to remove backslashes in code. E.g. in c++ or PHP code I frequently use \n for newlines. This is displayed as only n. If I view the source it shows: <span class="hl-special"></span><span class="hl-string">n</span> Instead of: <span class="hl-special">\</span><span class="hl-string">n</span> ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=9766&edit=1
-- Stoyan Stefanov http://www.phpied.com

« previous php.pear.qa (#4152) next »