X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Customized detailed images module want to prevent stripping of tags (https://forum.x-cart.com/showthread.php?t=63294)

tqualizerman 04-16-2012 06:46 AM

Customized detailed images module want to prevent stripping of tags
 
Hi,

I've been customizing the detailed images mod on a 4.4.5 build with some custom text fields, for which I'd like to be able to do some styling within but every time I apply changes the tags are stripped and only the plain text is saved.

Here's on example from my product_images_modify.tpl:

<td class="DataTable"><input type="text" size="32" name="image[{$images[image].imageid}][label]" value="{$images[image].label|strip_tags:false|escape}" style="width:100%" /></td>

Based on that I don't think the stripping is happening within this file but I'm not sure where to look. Does anyone have an idea where I might be able to control this so my custom fields don't get stripped of their stylings?

cflsystems 04-16-2012 11:10 AM

Re: Customized detailed images module want to prevent stripping of tags
 
You have to add any fields that will contain html tags to trusted variables array - $trusted_post_variables

tqualizerman 04-16-2012 11:36 AM

Re: Customized detailed images module want to prevent stripping of tags
 
I looked through several files but could only find that in a few (none had any effect though.)

Do you know which file I should be looking at?

cflsystems 04-16-2012 11:40 AM

Re: Customized detailed images module want to prevent stripping of tags
 
This module may not have one if it was not needed. You can always add it to the php file used to save the detailed images info

tqualizerman 04-16-2012 11:48 AM

Re: Customized detailed images module want to prevent stripping of tags
 
Thanks - I tried adding this code with my custom variables (which are working correctly):

define('USE_TRUSTED_POST_VARIABLES', true);
define('USE_TRUSTED_SCRIPT_VARS', true);

$trusted_post_variables = array(
'alt',
'label',
);

to modules/Detailed_Product_Images/config.php (as well as product_images_modify.php and product_images.php when that didn't work.) Unfortunately none of that did the trick either (cleared cache each time.)

Am I missing something maybe?

cflsystems 04-16-2012 12:23 PM

Re: Customized detailed images module want to prevent stripping of tags
 
It has to be to the file saving that info the database

tqualizerman 04-17-2012 11:07 AM

Re: Customized detailed images module want to prevent stripping of tags
 
I expect that the file is product_images_modify.php and product_images.php - but unfortunately that doesn't seem to be working. Is there a chance it might be another PHP file?


All times are GMT -8. The time now is 05:18 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.