#24953 [NEW]: Nonstandard chars in Image_GraphViz labels
| From: | php-bug-NOSPAM-2003-aug-05 at ryandesign dot de | Date: | Tue, 05 Aug 2003 17:04:37 +0000 |
| Subject: | #24953 [NEW]: Nonstandard chars in Image_GraphViz labels | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-19301@lists.php.net to get a copy of this message | ||
From: php-bug-NOSPAM-2003-aug-05 at ryandesign dot de
Operating system: Linux
PHP version: Irrelevant
PHP Bug Type: PEAR related
Bug description: Nonstandard chars in Image_GraphViz labels
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 bug report at http://bugs.php.net/?id=24953&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24953&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24953&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=24953&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24953&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24953&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24953&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24953&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24953&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24953&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24953&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24953&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24953&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24953&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24953&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24953&r=gnused