Certain Text being stripped from forum post

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Certain Text being stripped from forum post
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I searched for as long as possible. Here is the issue, when posting this text

$bbcode_tpl['web'] = "<iframe width="100%" height="600" src="$1"></iframe>";


It comes out like this
$bbcode_tpl['web'] = "<iframe></iframe>";


I have to get this fixed asap.
Thanks in advance,

Edit: hmm.. this site strips the slashes out. Try without a code box.


Back to top Reply with quote
#2   re: Certain Text being stripped from forum post
BigJim
CZ Super Newbie
BigJim has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jun 09, 2006
0.01 posts per day
Posts: 60
Points: 1,327
   
O.K. bear with me here...taking a shot at this...have you tried locating and commenting out:
   $str = stripslashes($str);
in the mainfile.php? (backup the original first of course)


Back to top Reply with quote
#3   re: Certain Text being stripped from forum post
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
the only thing I could find that was close to what you suggested. Would that be the only line to comment out you think?

function check_html ($str, $strip="") {
   /* The core of this code has been lifted from phpslash */
   /* which is licenced under the GPL. */
   require(INCLUDE_PATH."config.php");
   if ($strip == "nohtml") $AllowableHTML = array('');
   $str = stripslashes($str);
   $str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>",'<\1>', $str);
   // Delete all spaces from html tags .
   $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*"?[[:space:]]*([^" >]*)[[:space:]]*"?[^>]*>",'<a href="\1">', $str);
   // Delete all attribs from Anchor, except an href, double quoted.
   $str = eregi_replace("<[[:space:]]* img[[:space:]]*([^>]*)[[:space:]]*>", '', $str);
   // Delete all img tags
   $str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*"?javascript[[:punct:]]*"?[^>]*>", '', $str);
   // Delete javascript code from a href tags -- Zhen-Xjell @ http://nukecops.com
   $tmp = "";
   while (ereg("<(/?[[:alpha:]]*)[[:space:]]*([^>]*)>",$str,$reg)) {
      $i = strpos($str,$reg[0]);
      $l = strlen($reg[0]);
      if ($reg[1][0] == "/") $tag = strtolower(substr($reg[1],1));
      else $tag = strtolower($reg[1]);
      if ($a = (isset($AllowableHTML[$tag])) ? $AllowableHTML[$tag] : 0)
      if ($reg[1][0] == "/") $tag = "</$tag>";
      elseif (($a == 1) || (empty($reg[2]))) $tag = "<$tag>";
      else {
         # Place here the double quote fix function.
         $attrb_list=delQuotes($reg[2]);
         // A VER
         $attrb_list = str_replace("&amp;","&",$attrb_list);
         $attrb_list = str_replace("&","&amp;",$attrb_list);
         $tag = "<$tag" . $attrb_list . ">";
      } # Attribs in tag allowed
      else $tag = "";
      $tmp .= substr($str,0,$i) . $tag;
      $str = substr($str,$i+$l);
   }
   $str = $tmp . $str;
   return $str;
   exit;
   /* Squash PHP tags unconditionally */
   $str = str_replace("<?","",$str);
   return $str;
}



Back to top Reply with quote
#4   re: Certain Text being stripped from forum post
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
Also found this line in modules/Forums/posting.php

$message = ( !empty($HTTP_POST_VARS['message']) ) ? htmlspecialchars(trim(stripslashes($HTTP_POST_VARS['message']))) : '';


I am not familiar with trim though.


Back to top Reply with quote
#5   re: Certain Text being stripped from forum post
BigJim
CZ Super Newbie
BigJim has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jun 09, 2006
0.01 posts per day
Posts: 60
Points: 1,327
   
...You're running Ravens Nuke package correct? Locate around line 954 in mainfile.php for that code...



Back to top Reply with quote
#6   re: Certain Text being stripped from forum post
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
function check_html has to be it, so I commented it out with not results.



Back to top Reply with quote
#7   re: Certain Text being stripped from forum post
BigJim
CZ Super Newbie
BigJim has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: Jun 09, 2006
0.01 posts per day
Posts: 60
Points: 1,327
   
Perhaps look in corresponding files for the code I posted and comment that code out... My YIM is up and running....click me if you want to collaborate on this issue.



Back to top Reply with quote
#8   
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Are you running phpBB 2.0.21?

If you are, try adding iframe to your whitelist of html tags in your forum admin and see if that works.

For some reason 2.0.21 seems to strip out the tags on html that isn't whitelisted in the forum admin.

Not sure if this works, as I haven't updated my boards since 2.0.19.




_________________
[ Register or login to view links on this board.]
Vivere disce, cogita mori
Back to top Reply with quote
#9   re: Certain Text being stripped from forum post
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
its 2.0.20, evader99 told me due to phpbb aggresive nature there was nothing you could do about it. Except downgrade.



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum