This problem was driving me crazy forever and finally fixed it by disabling Glossify.

Whenever I would try to put javascript in a node, it would work when I previewed the node but when I submitted it the code would change making the javascript not functional.

For example it would change quotes (") to "

There were other symbols it would change but I don't have a full list.

Comments

joshmv’s picture

Priority: Normal » Critical
locomo’s picture

subscribe

omerida’s picture

I found that commenting out line 410 fixed this for me, haven't seen any adverse effects from it not running...

// escape again the htmlentities - useful for non autolinked characters - so they are returned to their previous html-entities-state
// (autolinked chars are whatever the link-to titles/strings are ...)
// $haystack = htmlentities($haystack, ENT_COMPAT, "UTF-8");

Ivo.Radulovski’s picture

Priority: Critical » Normal
Status: Active » Postponed

try using the new version - the 2.x will not be supported any more.

omerida’s picture

I'd like to try the beta but looking at the process step for the input filter, it seems like it'll kill performance when you have a large number of nodes.

case 'process':
 	       if (($node = menu_get_object()) == NULL) {
 	         $q = db_query("SELECT nid, format, body FROM {node_revisions} WHERE 1");
 	         while ($r = db_fetch_array($q)) {
 	           if ($cache_id == $r['format'].':'.md5($r['body'])) {
 	             $nid = $r['nid'];
 	           }
 	         }
                 $node = node_load($nid);
               }
            }

I think you could rewrite the query as -

$q = db_query('SELECT nid FROM {node_revisions} WHERE "%s"=CONCAT(format, ':', MD5(body))', $cache_id);
$r = db_fetch_object($q);
$node = node_load($r->nid);
Ivo.Radulovski’s picture

Thank you very much for your input, i have also recieved a couple of other very helpful tips and will implement them today.
I'd be very glad if you could tell me your thoughts on the next beta release.

WorldFallz’s picture

Status: Postponed » Closed (fixed)

seems fixed in 6.x-3.x.