Opened 6 years ago

Last modified 6 years ago

#1589 new defect

Strange issue with the string 'graph' in the body of a xinha enabled text area

Reported by: guest Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc:

Description

I have implemented the Xinha editor in a number of projects over many years and never noticed this issue before (that doesn't necessarily mean it wasn't there). In an instance where I have multiple editors on one page, if the text 'graph' is included anywhere in any of the editors (either on it's own or as part of another word such as 'photographic'), the currently enabled editor fails to load and I get a javascript error on the page as follows:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152)
Timestamp: Tue, 29 Nov 2011 15:30:37 UTC

Message: 'parentNode' is null or not an object
Line: 2635
Char: 3
Code: 0

If I remove or modify the text, everything works fine!! I have given this as a temporary workaround at the moment but, as you can understand, replacing "Graph" with "Chart" is much more acceptable than replacing "photographic" with "photografic"....

Unfortunately, I don't have any time at the moment to investigate further but thought it worthwhile to just raise here in case anyone has come across this or if it rings any bells with those of you that maintain or add to Xinha. I have searched the site without success.

When I get more time to investigate, if I find a resolution/root cause, i'll post an update here.

Change History (2)

comment:1 Changed 6 years ago by gogo

Disable all Xinha plugins and then try.

There's no reason that simply the word "graph" would cause such a thing in the Xinha core that I can think of.

And for the love of all that is holy, use a proper browser when you debug, Chrome or Firefox.

comment:2 Changed 6 years ago by guest

I don't know who reported this, but I found the same issue and tracked it down to the Equation plugin (ASCIIMathML.js) at this line:

var am = /amath\b|graph/i.test(st);

I'm not sure about how to fix this properly, but for now I've just removed the graph test:

var am = /amath\b/i.test(st);

Note: See TracTickets for help on using tickets.