68 Classifieds Forums  

Go Back   68 Classifieds Forums > v3.1.x Help & Support > v3.1 Questions & Support
Register Projects FAQ Members List Calendar Search Today's Posts Mark Forums Read

v3.1 Questions & Support Help and support for 68 Classifieds v3.1.x

 
Thread Tools Display Modes
  #21  
Old 07-28-2007, 05:24 PM
GSP GSP is offline
Senior Member
 
Join Date: Apr 2006
Posts: 121
Default

Hello,

I�m having problems with this one and I�m unsure why at this point, it seems easy enough. I�m trying to allow users to the ability to post pre-determined html tags in their ads description. I thought I�d post and see if anyone can see where I�ve gone wrong.

I�ve followed the instructions as per threads 1 and 2 in this post. Opened includes/functions.php and replaced line 635 with John�s #2 thread:


PHP Code:
$allowed_tags = array("<br>", "<a>", "<b>")
$str = strip_tags($str, $allowed_tags);
Lines 636 and 637 I left as is:

$str = preg_replace('/\0+/', '', $str);
$str = preg_replace('/(\\\\0)+/', '', $str);

So far when I input the above it wipes out my site causing nothing more than a blank white screen. Any ideas?
__________________
Best Regards,

Tom
V3.1.7
Developer
Reply With Quote
  #22  
Old 07-30-2007, 08:10 AM
GSP GSP is offline
Senior Member
 
Join Date: Apr 2006
Posts: 121
Default

Is their anyone that might be able to help me out with this or anyone that could advise me as to where I have gone wrong?
__________________
Best Regards,

Tom
V3.1.7
Developer
Reply With Quote
  #23  
Old 08-21-2007, 08:23 AM
CHRD CHRD is offline
Member
 
Join Date: Nov 2006
Posts: 83
Default

how can I stop it from stripping line breaks from extra field text boxes, this fix works for Short Disc and Main Disc
__________________
Costa del Sol
Spain
v3.1.7 Developer
�Powerful you have become, the dark side I sense in you.�
Reply With Quote
  #24  
Old 08-23-2007, 01:10 AM
Chaslie Chaslie is offline
Moderator
 
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 587
Default Found a Quick Fix for tag stripping in extra fields

Have found a quick fix for tags being stripped in extra fields. If you revert back to using includes/functions.php from v3.1.4 (Revision: 1.9) , the tags are not lost when you 'add' or 'modify' a listing in the front end - both for Short description, description AND extra fields (particularly when you include an embeded video).

The main difference between these 2 files is that v3.1.4 has this:
Code:
if($lev==0)
	{
		$path[]= safeStripSlashes($row['name']);
	}
	else
	{
and 3.1.7 doesn't.

However v3.1.7 (Revision: 1.13) has all the xss_clean componant added where as v3.1.4 doesn't.

I'll submit this to Bug Tracker.

I have also been having the problem with adding the '$str = strip_tags' suggestions made earlier. Adding <br> was fine but anything else was throwing up MySQL errors and still stripping the code (in extra fields only).
__________________
Chaslie
V3.1.7 dev
mods.auscity.com
AUSCITY
Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting issue since upgrade to 3.1.7 dawyatt v3.1 Questions & Support 18 04-26-2007 01:09 PM
New posts in html page thereptilesource v3.1 Modifications 4 02-16-2007 12:25 PM
RSS feed to HTML page SkGold v3.1 Modifications 10 12-29-2006 05:39 PM
Renewal E-mails... HTML or Plain Text? flyingpylon v3.1 Questions & Support 2 11-01-2006 03:24 PM
Will 68 support html ads manilaboy v3.1 Questions & Support 2 10-22-2006 08:59 PM


All times are GMT -4. The time now is 01:35 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2007, Jelsoft Enterprises Ltd.