VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: beesbane on March 06, 2013, 03:48:26 AM

Title: Allow Script Tags in Category Descriptions
Post by: beesbane on March 06, 2013, 03:48:26 AM
I've looked around for a while now, and I can't seem to figure this out.

How do I allow script within the product category descriptions? All the solutions I have found reference a folder structure that doesn't exist.
Title: Re: Allow Script Tags in Category Descriptions
Post by: certico on November 11, 2014, 16:34:06 PM
Came across this old post when trying to figure this out for myself, OP seems well indexed in google for relevant search term so here is how I did it:

This is in Virtuemart 2.6.8 find the following file:
/administrator/components/com_virtuemart/controllers/category.php

around line 56:

$data['category_description'] = JRequest::getVar('category_description','','post','STRING',JREQUEST_ALLOWHTML);


Change this to


$data['category_description'] = JRequest::getVar('category_description','','post','STRING',JREQUEST_ALLOWRAW);


AFAIK this bypasses all filtering on the category description user input so use with caution.