Hello Cleon.
First of all thank you for your reply.
I re-read my message and I see that I was indeed too abbreviated. I'm sorry for that.
The key is in the subject. I am working with jsxgraph inside the STACK package, which in turn works on top of Moodle.
The behaviour I am referring to I think is actually linked to Moodle. I write the code inside an editor box, and when I save Moodle filters the text and makes the change I am referring to. I can use the '<' character as part of html code, for example in <p>, but when it is 'alone', such as when using it as an operator in a Javascript expression, it replaces it with <. The same happens with '&&', which is replaced by '&&'.
I think it's a Moodle security theme, although I don't know exactly.
I realise I'm bordering the off topic, but I think it's possible that there is someone on the forum who works with STACK and has found (and perhaps solved) this problem.
I will also look for a Moodle forum to raise the issue, but I fear that the percentage of Moodle users who have tried to use something like jsxgraph is very small, so I think they are less likely to understand my problem.
Best wishes,
Javier