]> granicus.if.org Git - graphviz/commitdiff
Fix bug 1421
authorerg <devnull@localhost>
Mon, 18 Aug 2008 20:25:43 +0000 (20:25 +0000)
committererg <devnull@localhost>
Mon, 18 Aug 2008 20:25:43 +0000 (20:25 +0000)
cmd/gvpr/actions.c

index d8f04b55a46e7f6393a15ed53a5178bd287b12ef..bb704513b3fd36bd716b9dfb8bd45a39cc78050b 100644 (file)
@@ -127,6 +127,7 @@ int copyAttr(Agobj_t * src, Agobj_t * tgt)
     Agsym_t *tsym = 0;
     int skind = AGTYPE(src);
     int tkind = AGTYPE(tgt);
+    char* val;
 
     srcg = agraphof(src);
     tgtg = agraphof(tgt);
@@ -134,7 +135,14 @@ int copyAttr(Agobj_t * src, Agobj_t * tgt)
        tsym = agattrsym(tgt, sym->name);
        if (!tsym)
            tsym = agattr(tgtg, tkind, sym->name, "");
-       agxset(tgt, tsym, agxget(src, sym));
+       val = agxget(src, sym);
+       if (aghtmlstr (val)) {
+           val = agstrdup_html (tgtg, val);
+           agxset(tgt, tsym, val);
+           agstrfree (tgtg, val);
+       }
+       else
+           agxset(tgt, tsym, val);
     }
     return 0;
 }