![]() |
Where is it stripping HTML tags??
When I change the value of the Languages, for example changing "txt_welcome" to include the text "Welcome!" it strips out the HTML tags and only inserts "Welcome!" into the DB. I looked all over the code and can't find where it it stripping the tags. Please help!!
Thanks! |
globals.php
Code:
function func_strip_tags($var) { ;) |
Thanks Boomer! It looks as if the func_strip_tags function is used all over the place, not just for editing language variables. So how could I manually disable the tag stripping JUST for editing language variables. I did a "grep -r 'func_strip_tags' *" in the root of the /xcart directory and it only found matches in globals.php, nothing else. That doesn't make sense to me. I couldn't find any references to this in languages.php. Any suggestions?
Thanks! |
Just comment out line:
Code:
$HTTP_POST_VARS[$__var] = func_strip_tags($__res); As globals.php is included in every file. All post data is stripped of html. |
Worked perfectly! You the man Boomer.
Thanks so much. |
Just as a follow up, I found that the safe way to do this is to leave globals.php alone and at the top of languages.php, it should be:
Code:
define('USE_TRUSTED_POST_VARIABLES',1); This authorizes var_value and new_var_value as trusted post variables and will not strip the HTML tags. |
Thanks for this post. This was baffling me.
|
4.0.x
Where is $trusted_post_variables defined in 4.0.x? I seem to be missing it.. ;)
jf |
They probably drastically changed the way they handle trusted vars, just a guess. I am still on 3.4.x stable branch, so I can't help you here. Sorry.
|
All times are GMT -8. The time now is 12:26 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.