disable/enable WYSIWYG

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
thomask
Posts: 5
Joined: Wed May 30, 2007 8:12 am

disable/enable WYSIWYG

Post by thomask »

i'am using the new myFAQ 2.1 dev and want to put off the wysiwyg, is this possible? i want to use simple textareas to show my content and the wysi editor creates html tags into my text :/
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

currently there's no built-in option to disable the editor component but we could add this. Why don't you like the editor?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
thomask
Posts: 5
Joined: Wed May 30, 2007 8:12 am

Post by thomask »

i am using your FAQ like a pure textcontainer.

i edited the artikel.tpl so the maincontent comes out as a textareafield, but the createEntry functions is putting HTML tags into the text and DB :(
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you have to disable the Editor in admin/header.php

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
thomask
Posts: 5
Joined: Wed May 30, 2007 8:12 am

Post by thomask »

cool, got it. thanks :D
thomask
Posts: 5
Joined: Wed May 30, 2007 8:12 am

Post by thomask »

could you give me a hint to find the function putting/sorting HTML tags into the DB? i need to get some HTML code into the DB and the FAQ cut it off (f.e. the title and frame TAG)
Thorsten
Posts: 15726
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

just look into the PMF_Faq class in the file inc/Faq.php.

Look for the function addRecord().

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi thomask,
you should also take a look at the basicXSSClean function in the inc/Init.php file, precisely:

Code: Select all

...
        // remove really unwanted tags
        do {
            $oldstring = $string;
            $string = preg_replace('#</*(applet|meta|xml|blink|link|style|script|embed|object|iframe|frame|frameset|ilayer|layer|bgsound|title|base)[^>]*>#i',"",$string);
        } while ($oldstring != $string);
...
where we impose the deletion of some unsafe (i.e. used for common attacks for e.g. XSS injection) HTML tags.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
thomask
Posts: 5
Joined: Wed May 30, 2007 8:12 am

Post by thomask »

thanks, you guys do an amazing work!
Post Reply