Hi,
For one of my form entries I have incorporated the default TinyMCE editor to update content in a Text Area. This is useful to carry over styled content, bullets and other HTML formatting.
However when I add any HTML hyperlinks the data will not store in my DB table correctly.
I tried using the word "Google" with "http://www.google.com" as the hyperlink.
When I checked the MySQL database the following was stored:
I assume the stripping is a security check - is it possible to disable this and allow the HTML to be correctly formatted?
Thanks,
Brendan
For one of my form entries I have incorporated the default TinyMCE editor to update content in a Text Area. This is useful to carry over styled content, bullets and other HTML formatting.
However when I add any HTML hyperlinks the data will not store in my DB table correctly.
I tried using the word "Google" with "http://www.google.com" as the hyperlink.
When I checked the MySQL database the following was stored:
<div></div><ul><li><a mce_href="../../undefined/" href=|||||"||.||.||/||.||.||/||u||n||d||e||f||i||n||e||d||/||||"||>Google<br></a><br mce_bogus=|||||"||.||.||/||.||.||/||u||n||d||e||f||i||n||e||d||/||||"||></li></ul>I assume the stripping is a security check - is it possible to disable this and allow the HTML to be correctly formatted?
Thanks,
Brendan
Hi Brendan,
ChronoForms itself doesn't do any 'escaping' of form data (if anything it steers a bit too far the other way). I suspect that the MCE Editor might be doing this itself - especially as the href attribute is escaped but the mce-href attribute with the same value is left alone.
Try turning DeBug on in the Form Genral tab and see what data is being submitted.
Bob
ChronoForms itself doesn't do any 'escaping' of form data (if anything it steers a bit too far the other way). I suspect that the MCE Editor might be doing this itself - especially as the href attribute is escaped but the mce-href attribute with the same value is left alone.
Try turning DeBug on in the Form Genral tab and see what data is being submitted.
Bob
Thanks Bob,
That is definitely pointing me in the right direction - I might try some other editors to see what happens.
I have just re-submitted the form. Text used was "Google Hyperlink" and the hyperlink used was "http://www.google.com".
Debug result as follows:
And in the MySQL database the following appeared:
Anyway, like you said it is not a Chronoforms issue so I will have a look at other editors.
Thanks as ever, happy New Year.
Brendan
That is definitely pointing me in the right direction - I might try some other editors to see what happens.
I have just re-submitted the form. Text used was "Google Hyperlink" and the hyperlink used was "http://www.google.com".
Debug result as follows:
$_POST Array: Array ( [EMAIL] =>
||<||/||p||>Google hyperlink
And in the MySQL database the following appeared:
<p><a href="http://www.google.com" mce_href="http://www.google.com" style=|||||"|| || ||h||y||p||e||r||l||i||n||k||<||/||a||>||<||/||p||>Google hyperlink</a></p><div></div>Anyway, like you said it is not a Chronoforms issue so I will have a look at other editors.
Thanks as ever, happy New Year.
Brendan
Hi Brendan,
We've certainly used the standard MCE editor to drive content boxes before - though not to process raw HTML - (and even used MCE JavaScript functions to load and clear them). It may be that you need to change some MCE setting to allow the processing of HTML without this escaping (or conversion to HTML entities).
Bob
We've certainly used the standard MCE editor to drive content boxes before - though not to process raw HTML - (and even used MCE JavaScript functions to load and clear them). It may be that you need to change some MCE setting to allow the processing of HTML without this escaping (or conversion to HTML entities).
Bob
This topic is locked and no more replies can be posted.
