Hey guys, I'm currently building an app that lets users submit notes using the rich text editor and I've come across an issue I can't seem to resolve involving text with color.
When I try and submit {{ richTextEditor.value }}
containing text with color to an SQL table I get a 403 permission denied error, and removing the coloured text resolves the issue, allowing the query to submit as expected.
Example of a payload (from Chrome console) that fails:
<h2>Heading</h2><p><br></p><ul><li><strong>Bold text</strong></li><li>Normal text</li></ul><p><span style=\"color: rgb(230, 0, 0);\">Red text</span></p><p class=\"ql-indent-2\"><span style=\"color: rgb(0, 138, 0);\">Indented text</span></p><p class=\"ql-indent-2\"><br></p><p><a rel=\"noopener noreferrer\" href=\"https://retool.com/\" target=\"_blank\">Linked text</a></p>
Example of a payload (from Chrome console) that succeeds:
<h2>Heading</h2><p><br></p><ul><li><strong>Bold text</strong></li><li>Normal text</li></ul><p><br></p><p class=\"ql-indent-2\"><br></p><p><a rel=\"noopener noreferrer\" href=\"https://retool.com/\" target=\"_blank\">Linked text</a></p>
I haven't been able to find any reason online as to why either the span tag or the color field would be causing a 403 error when running the SQL insert.
Thanks