Closed GoogleCodeExporter closed 9 years ago
Actually the fix I suggest doesn't work... but I wanted to at least report the
problem.
Original comment by adambenjaminvarga
on 8 Oct 2010 at 8:02
i'm not sure that this would be jsPlumb's responsibility, really. like the
docs say, if you want to use an id with characters like that, you must escape
the characters.
also, i wouldn't be overly keen to add a piece of code that is executed on a
heavily trafficked method to cover what is almost certainly a very small
percentage of cases.
if it works for you when passing in an escaped string to jsplumb then i don't
think there's anything to do here.
Original comment by simon.po...@gmail.com
on 8 Oct 2010 at 10:56
any updates on this? i'm about to do a release and i'm gonna close it out
unless you have an update....
Original comment by simon.po...@gmail.com
on 12 Oct 2010 at 8:24
I'm using jsPlumb in a Chrome extension that injects javascript into all sorts
of web pages. If I had control of the web pages it was injecting into, I'd
avoid any non-alphanumeric characters and this wouldn't be an issue. Inputs
with these funky characters are definitely an edge case for me. There are a few
spots were jsPlumb converts objects to and from ids... I unfortunately can't
get around this issue by just feeding jsPlumb the input object instead of its
id. I can have my extension strip non alpha number characters from the ids
before passing then to the plugins, but I think it would be cleaner if I didn't
have to.
Original comment by adambenjaminvarga
on 12 Oct 2010 at 9:00
[deleted comment]
sounds interesting!
my concern is the performance hit from running that regex inside a method that
gets called a lot. but then it is kind of appealing to make it more robust.
does your extension include any other JS? have you considered that you could
override that method by including a JS snippet like this, after the jsPlumb
include:
jsPlumb.CurrentLibrary.getElementObject = function(el) {
return typeof(el)=='string' ? $("#" + el.replace(/(\[|\]|\.)/g, '\\\\$1')) : $(el);
};
?
Original comment by simon.po...@gmail.com
on 13 Oct 2010 at 9:45
i'm closing this. there's a documented fix and i'm reluctant to put it in the
jsPlumb core.
Original comment by simon.po...@gmail.com
on 23 Nov 2010 at 9:17
Original issue reported on code.google.com by
adambenjaminvarga
on 8 Oct 2010 at 8:00