Re: Bug #9766 [Opn]: Slashes are removed
| From: | Stoyan Stefanov | 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-- Stoyan Stefanov http://www.phpied.comID: 9766User updated by: jan at ivtaco dot seReported By: jan at ivtaco dot se Status: Open Type: Bug Package: Text_HighlighterOperating System: irreleveant Package Version: 0.6.9PHP Version: IrrelevantNew 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