News:

Support the VirtueMart project and become a member

Main Menu

VM admin strips simple html tags out of fields when saving

Started by communion, July 11, 2012, 05:56:06 AM

Previous topic - Next topic

communion

This may be a Virtuemart 2 issue, but certain fields accept simple html tags, others are stripped. Is there a Joomla override to prevent html tags being stripped out of admin fields?

Thanks in advance

communion

Does anyone have any idea about this? I need to format some things with line breaks, they are stripped out of admin fields when saved. Such as "Image Description" input box.

Thanks in advance.

John2400

sometimes this is your editor in Joomla - in global configuration - you could update your editor - (free) .

or turn off your editor and copy and paste -

or hunt for the html  -- in joomla forums

or go to joomla global configuration ->>text filter >>superuser ( you) >> set >>no filtering


communion

That's not the issue. I'm not talking about editor windows because I don't use TinyMCE, and have the system plugin disabled.

I'm referring specifically to the input fields in the Photo description areas, title etc.

See I have VM using prettyPhoto which pulls the Image description as the title and when I add line breaks <br /> they get stripped out when I save the product.

Can anyone else on the VM team answer this?

Thanks in advance.

John2400

I added <p> and </p>  at the beginning and end of the pasted code and they held.
I tried prettyphoto , flash, youtube , single and group images.

communion

Hi, thanks for your response. I tried this, it doesn't work in this field:  Displayed image title

This is the image title that is pulled into prettyPhoto. Any ideas?

John2400

I am using JCE version 2.2.3 text editor - in the product description area. 

communion

Yeah that's exactly my question. Why are tags acceptable in product description <textarea> but not in <inputbox>

Can someone answer this?

jenkinhill

For processing the image description VM uses the following code in media.php:

JRequest::getVar('file_description','','post','STRING',JREQUEST_ALLOWHTML);

As you see Joomla is instructed to allow some HTML in the entry - JREQUEST is an instruction to Joomla, see http://docs.joomla.org/Retrieving_and_Filtering_GET_and_POST_requests_with_JRequest::getVar

Sounds like your code is being sanitized somewhere, not sure if this is in Joomla or VM
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

perlarenee

in older forums they were referring to a blacklist...i'm not sure if that might be the case in vm2 as well