Fatal error when exporting attributes containing a '&' sign

Issue #25 new
Tobias Bornakke created an issue

Hi George,

Thanks for a so needed R extension which I'm often using.

Currently I'm however encountering an error whenever I have attributes containing an & sign.

Code to reproduce the error:

library(igraph)
library(rgexf)
g <- erdos.renyi.game(100, 1/100)

g <- set.vertex.attribute(g, "test", index=V(g), "Some & Some")
gexf <- igraph.to.gexf(g)

Error given: xmlParseEntityRef: no name Error: 1: xmlParseEntityRef: no name

Any suggestions to why this might happen? In the current situation I can probably just remove any &, however it took me more than an hour to identify the cause of the error which is difficult to guess based on the error message.

Best regards Tobias

Comments (1)

  1. George Vega Yon repo owner

    Hi Tobias, I were able to reproduce the error message (thanks). Will fix it later.

    Thanks!

    George

  2. Log in to comment