We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • It looks like the Update processor is not formatting the Rich Text content properly.

    If any html tags are inserted (<strong>, <em>, etc), the following error occurs on save:

    Uncaught SyntaxError: Invalid regular expression: missing /

    This is the bit that is malformed:

    in the successmessage parameter, it is not encoding/escaping the first <b> tag, but it is the closing tag, and that is wigging out the JSON string

    Is there something that I can add to the update.class.php to clean this up?

    This question has been answered by dvstudiosinc. See the first response.

    • discuss.answer
      Digging through things (and looking at other Extras that save RTE content), it looks like the part of both the forms/update.class.php and forms/create.class.php that is causing the error is the public function cleanup(), more pointedly the return statement "return parent::cleanup();"

      I replaced it with the following (which unsets the RTE fields prior to returning the success response... which seems to be where the issue was):
      public function cleanup() {
              $objectArray = $this->object->toArray('',true);
              return $this->success('',$objectArray);

      This fixed the error and now the Form Manager will complete its save process without complaint.

      It sure would be nice to have this component on GitHub to put all these updates I have been implementing on my install somewhere that Charles could pull em....