Add FAQ with WYSIYG in the Home-Site not just in the "Backend-Page".
I have seen that some of you have that problem and solved it.
But how did you solved that problem??
Thank you in advance.
Add FAQ with WYSIYG
Moderator: Thorsten
Re: Add FAQ with WYSIYG
Hi,
I think some users added TinyMCE into the add.tpl page. It's just a little bit of JavaScript.
bye
Thorsten
I think some users added TinyMCE into the add.tpl page. It's just a little bit of JavaScript.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 1
- Joined: Mon Oct 25, 2010 7:34 pm
Re: Add FAQ with WYSIYG
Just tried activating TinyMCE in add.tpl.
It works, the toolbars and everything shows up at the textarea "content", but formatting gets stripped off when submitted. For example, line breaks become "nbsp;" when the submitted added content is subsequently viewed by Admin.
Two questions:
1. Does the rich text sanitation happen on submission or on output in this case?
2. Is there a way to preserve rich formatting of submitted areas if TinyMCE is enabled via add.tpl?
Thanks.
It works, the toolbars and everything shows up at the textarea "content", but formatting gets stripped off when submitted. For example, line breaks become "nbsp;" when the submitted added content is subsequently viewed by Admin.
Two questions:
1. Does the rich text sanitation happen on submission or on output in this case?
2. Is there a way to preserve rich formatting of submitted areas if TinyMCE is enabled via add.tpl?
Thanks.
Re: Add FAQ with WYSIYG
Hi,
you have to change the line 42 in save.php from
to
Please note, that then XSS attacks are possible.
bye
Thorsten
you have to change the line 42 in save.php from
Code: Select all
$content = PMF_Filter::filterInput(INPUT_POST, 'content', FILTER_SANITIZE_STRIPPED);
Code: Select all
$content = PMF_Filter::filterInput(INPUT_POST, 'content', FILTER_SANITIZE_STRING);
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
-
- Posts: 5
- Joined: Wed Dec 01, 2010 6:11 pm
Re: Add FAQ with WYSIYG
The answer is documented here.
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/
http://goinggnu.wordpress.com/2010/12/0 ... -phpmyfaq/