#24953 [Opn->Bgs]: Linux and windows

From: Date: Wed, 06 Aug 2003 16:26:46 +0000
Subject: #24953 [Opn->Bgs]: Linux and windows
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-19328@lists.php.net to get a copy of this message
ID: 24953 Updated by: nicos@php.net -Summary: Nonstandard chars in Image_GraphViz labels -Reported By: php-bug-NOSPAM-2003-aug-05 at ryandesign dot de +Reported By: nicos@php.net -Status: Open +Status: Bogus Bug Type: PEAR related -Operating System: Linux +Operating System: Irrevelant PHP Version: Irrelevant New Comment: It looks bogus to me. The class can't know you want to escape. Use \n. and yes you *should* know. Previous Comments: ------------------------------------------------------------------------ [2003-08-05 12:04:37] nicos@php.net Description: ------------ If I use the chars quote, backslash, or newline in labels passed to Image_GraphViz's functions addNode et al, the resulting GraphViz markup is syntactically invalid and the graph it produces does not look visually like what I intended it to look like. Reproduce code: --------------- <?php require "Image/GraphViz.php"; $g = new Image_GraphViz(); $g->addNode(1, array('label' => 'Node "One" 2nd line')); $g->image('png'); ?> Expected result: ---------------- Expected: graph with one node whose label spans 2 lines and looks like this: Node "One" 2nd line Actual result: -------------- Actual: graph with one node whose label spans only one line and looks like this: Node I can get the desired result by instead writing... $g->addNode(1, array('label' => 'Node \"One\"\n2nd line')); ...but as the user of the Image_GraphViz class I shouldn't have to know GraphViz's escaping rules. The class should handle this for me -- probably in its parse() function. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24953&edit=1

« previous php.pear.dev (#19328) next »