Page 1 of 1

source code not save in category description

Posted: 27 Feb 2013, 00:16
by nickg
hello
in the description of a category I want to put this code:
<img onmouseover="this.src='images/phocagallery/australie/mord/logo_video2.png';" onmouseout="this.src='images/phocagallery/australie/mord/logo_video.png';" dir="ltr" style="margin: 10px; float: right;" src="images/phocagallery/australie/mord/logo_video.png" alt="logo video" height="108" width="113" />:

when I save it, a part of this code it is not saved : One part is removed.
<img dir = "ltr" style = "margin: 10px; float: right;" src = "images / phocagallery / australia / bites / logo_video.png" alt = "logo video" height = "108" width = "113" />
In an article in joomla I have no problem, everything is saved
In the configuration of joomla I tried several editors, TinyMCE, JCE, noWYSIWYG
In the configuration of JCE in the cleaning option is OFF
The filter text in the config for joomla, super administrator is on NO FILTER
I'am lost :x

Re: source code not save in category description

Posted: 28 Feb 2013, 20:02
by Jan
Hi, you need to modify the XML for the form of Phoca Gallery description:

administrator\components\com_phocagallery\models\forms\phocagalleryc.xml

and change the filter for description:

Code: Select all

<field name="description" type="editor" buttons="true" hide="pagebreak,readmore" class="inputbox" label="COM_PHOCAGALLERY_FIELD_DESCRIPTION_LABEL" filter="safehtml" description="COM_PHOCAGALLERY_FIELD_DESCRIPTION_DESC" /> 
from safehtml to raw, etc.

Jan

Re: source code not save in category description

Posted: 01 Mar 2013, 13:27
by nickg
Thanks Jan
I was wondering why this option (raw) was not by default in phocagalleryc.xml file ?

Re: source code not save in category description

Posted: 01 Mar 2013, 23:57
by Jan
Hi, because of security.

Jan

Re: source code not save in category description

Posted: 06 Mar 2013, 14:36
by nickg
hi
do I need to modifie the line after I inserted my code ?
nick

Re: source code not save in category description

Posted: 06 Mar 2013, 20:05
by Jan
Hi, not sure what you mean for now?

Re: source code not save in category description

Posted: 07 Mar 2013, 14:39
by nickg
Hi , you told me : "because of security."
So changed, from safehtml to raw , it's mean the code file is not safety (?)

Re: source code not save in category description

Posted: 16 Mar 2013, 02:12
by Jan
Hi, depends on who is using your site and who have access to add content to your site, if you have some users who can add "everything" to your article -> database (article with all possible javascript) then of course this is not secure. If you are alone and you know which javascript you paste there, there is no problem (but while creating open source program, you need to count with every possible situations)

Jan

Re: source code not save in category description

Posted: 16 Mar 2013, 10:39
by nickg
thanks a lot for your answer