This is among a commonly asked question that “How to insert Youtube video” or “How to add embed tag” or “How to add object tag” in virtuemart product description.
The solution is very simple. You just need to update an array $tagBlacklist. As its name is self explanatory and which means “Black Listed Tags”. So you just need to remove embed and object tag from blacklist.
Virtuemart 1.5
1. Navigate to
administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php
2. Search the code
var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml');
3. Replace it with
var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'script', 'style', 'title', 'xml');
Virtuemart 2.0 +
1. Navigate to
\libraries\joomla\filter\input.php
2. Search for “$tagBlacklist” and remove the black listed tag assigned to $tagBlacklist
That’s all, go ahead and try to place an youtube video, .swf, .flv or any other flash files using embed and object tags in virtuemart product description.
Không có nhận xét nào:
Đăng nhận xét