Author Topic: problem with html on profiles  (Read 27797 times)

0 Members and 1 Guest are viewing this topic.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: problem with html on profiles
« Reply #15 on: January 25, 2006, 06:25:49 PM »
Quote

this do in all tags avaliable to users added your own stuff (not tags like age,country,etc )


Would it be possible to post a screenshot in order to see this problem in action ? ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #16 on: January 25, 2006, 08:14:27 PM »
and if i change on my DB_Fields_definitions.php :

Quote
$additional_user_fields['user_movies'] = array($lang['user_movies'], "text", 0);


to

Quote
$additional_user_fields['user_movies'] = un_htmlspecialchars(trim($HTTP_POST_VARS['user_movies']));


this will work ?


Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: problem with html on profiles
« Reply #17 on: January 25, 2006, 08:22:57 PM »
and if i change on my DB_Fields_definitions.php :

Quote
$additional_user_fields['user_movies'] = array($lang['user_movies'], "text", 0);


to

Quote
$additional_user_fields['user_movies'] = un_htmlspecialchars(trim($HTTP_POST_VARS['user_movies']));


this will work ?



Doubtful. Since, if you do this, the additional field you modified will no longer be a part as an array line but simply a simple string query. ;)

So, again, please post a screenshot in order to see this error live.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: problem with html on profiles
« Reply #18 on: January 25, 2006, 08:39:22 PM »
Good. Now, we're getting somewhere. So, where the

Quote

I\\\\\\'m Andi


is (and all the text below), what are the names of these additional fields ?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #19 on: January 25, 2006, 08:55:06 PM »
Quote
$additional_user_fields['user_music'] = array($lang['user_music'], "text", 0);
$additional_user_fields['user_city'] = array($lang['user_city'], "text", 0);
$additional_user_fields['user_occupation'] = array($lang['user_occupation'], "text", 0);
$additional_user_fields['user_yourself'] = array($lang['user_yourself'], "textarea", 0);
$additional_user_fields['user_movies'] = array($lang['user_movies'], "text", 0);
$additional_user_fields['user_books'] = array($lang['user_books'], "text", 0);
$additional_user_fields['user_cds'] = array($lang['user_cds'], "text", 0);
$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);


thats the fields, where users added info (text/html) where give error "\"  :?

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #20 on: January 25, 2006, 08:56:28 PM »
maybe if i change all for this way
Quote
$additional_user_fields['user_movies'] = un_htmlspecialchars(trim($HTTP_POST_VARS['user_movies']));

this ill work ?

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: problem with html on profiles
« Reply #21 on: January 25, 2006, 09:08:06 PM »
Quote

$additional_user_fields['user_music'] = array($lang['user_music'], "text", 0);
$additional_user_fields['user_city'] = array($lang['user_city'], "text", 0);
$additional_user_fields['user_occupation'] = array($lang['user_occupation'], "text", 0);
$additional_user_fields['user_yourself'] = array($lang['user_yourself'], "textarea", 0);
$additional_user_fields['user_movies'] = array($lang['user_movies'], "text", 0);
$additional_user_fields['user_books'] = array($lang['user_books'], "text", 0);
$additional_user_fields['user_cds'] = array($lang['user_cds'], "text", 0);
$additional_user_fields['user_signature'] = array($lang['user_signature'], "text", 0);


Ah ! excellent. Now, I might hear other solutions but the following are the ones that could be resolved :

Quote

$additional_user_fields['user_music'] = array(stripslashes(trim($lang['user_music'], "text", 0)));
$additional_user_fields['user_city'] = array(stripslashes(trim($lang['user_city'], "text", 0)));
$additional_user_fields['user_occupation'] = array(stripslashes(trim($lang['user_occupation'], "text", 0)));
$additional_user_fields['user_yourself'] = array(stripslashes(trim($lang['user_yourself'], "textarea", 0)));
$additional_user_fields['user_movies'] = array(un_htmlspecialchars(trim($lang['user_movies'], "text", 0)));
$additional_user_fields['user_books'] = array(stripslashes(trim($lang['user_books'], "text", 0)));
$additional_user_fields['user_cds'] = array(stripslashes(trim($lang['user_cds'], "text", 0)));
$additional_user_fields['user_signature'] = array(un_htmlspecialchars(trim($lang['user_signature'], "text", 0)));


Keep me posted on this.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #22 on: January 25, 2006, 11:25:43 PM »
i've just today see what make it added lots of "\" this happen with countries,and other dropdown forms , when this reload on own page (editprofile)  8O

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: problem with html on profiles
« Reply #23 on: January 25, 2006, 11:52:06 PM »
ok

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #24 on: January 26, 2006, 02:29:56 AM »
how make it not (refresh) on same page ?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: problem with html on profiles
« Reply #25 on: January 26, 2006, 02:52:31 AM »
Stoleti, nothing happens by itself. Trace back the changes you've made recently in member.php, functions.php and global.php
Also, for testing purposes, restore format_text() function in functions.php to the default one (from fresh 4images package).
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #26 on: January 26, 2006, 06:13:25 AM »
i've installled few mod's , but what i need restore in functions.php ?  :roll:

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #27 on: March 09, 2006, 05:04:44 PM »
Maybe woulb be necessary modify in functions the format_text , way to prevent trim to work and make not added the annoy "\" at my html tags in profile fields  :roll:

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: problem with html on profiles
« Reply #28 on: March 09, 2006, 06:20:12 PM »
you could try "stripslashes".
e.g. stripshlashes($yourtext);
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: problem with html on profiles
« Reply #29 on: March 09, 2006, 06:24:23 PM »
you could try "stripslashes".
e.g. stripshlashes($yourtext);

the problem is i don't know how or where do it , all i want its this stop added "\" in my html code (in my additional fields) in profile  :|