For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > January 2007 > Re: [PEAR-BUG] Bug #9766 [Opn]: Slashes are removed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-BUG] Bug #9766 [Opn]: Slashes are removed
Stoyan Stefanov

2007-01-12, 7:00 pm

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/s...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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com