|
-
August 22nd, 2002, 03:18 PM
#16
<b>Don't use apostrophes, quotes or commas. I need to write an algorithm to replace those characters when creating records in the database.</b>
-
August 22nd, 2002, 04:14 PM
#17
Registered User
heres a patch for you
Code:
function EditNotice()
Notice = replace(Notice, chr(10), "<br>")
Notice = replace(Notice, chr(34), """) // & #34;
Notice = replace(Notice, chr(39), "'") // & #39;
Notice = replace(Notice, chr(40), "(") // & #40;
Notice = replace(Notice, chr(41), ")") // & #41;
end Function
function ReplaceArticle()
Title = replace(Title, """, chr(34)) // & #34;
Title = replace(Title, "'", chr(39)) // & #39;
Title = replace(Title, "(", chr(40)) // & #40;
Title = replace(Title, ")", chr(41)) // & #41;
end Function
Title and Notice are html forms varibles
well the chars didnt come out
Last edited by +Daemon+; August 22nd, 2002 at 04:33 PM.
-
August 22nd, 2002, 05:38 PM
#18
Registered User
Renders perfectly for me..
Opera 6.04
nice...
-
August 22nd, 2002, 06:02 PM
#19
Registered User
-
August 22nd, 2002, 06:10 PM
#20
Registered User
<!-- Start of harbaughproject.com 468x60 banner-->
<a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_banner468x60.gif" border="0"></a>
<!-- End of harbaughproject.com 468x60 banner-->
<!-- Start of harbaughproject.com 88x31 banner-->
<a href="http://harbaughproject.com" target="_blank"><img src="http://harbaughproject.com/images/hp_minibanner88x31.gif" border="0"></a>
<!-- End of harbaughproject.com 88x31 banner-->
nice
-
August 22nd, 2002, 07:41 PM
#21
Originally posted by +Daemon+
heres a patch for you
Code:
function EditNotice()
Notice = replace(Notice, chr(10), "<br>")
Notice = replace(Notice, chr(34), """) // & #34;
Notice = replace(Notice, chr(39), "'") // & #39;
Notice = replace(Notice, chr(40), "(") // & #40;
Notice = replace(Notice, chr(41), ")") // & #41;
end Function
function ReplaceArticle()
Title = replace(Title, """, chr(34)) // & #34;
Title = replace(Title, "'", chr(39)) // & #39;
Title = replace(Title, "(", chr(40)) // & #40;
Title = replace(Title, ")", chr(41)) // & #41;
end Function
Title and Notice are html forms varibles
well the chars didnt come out
Ya, I was thinking something along those lines. I put my object names into an array.
Code:
TOPIC(1) = Request.Form("topic")
TOPIC(2) = Request.Form("name")
TOPIC(3) = Request.Form("email")
TOPIC(4) = Request.Form("message")
For i = 1 To Ubound(TOPIC)
TOPIC(i) = Replace(TOPIC(i), chr(34), """, 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(39), "'", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(40), "(", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(41), ")", 1, -1, 1)
TOPIC(i) = Replace(TOPIC(i), chr(42), "*", 1, -1, 1)
Next
I just hate that if I every wanted to use the database for anything else then I would have the HTML Character Codes in the records. I eventually want to put a search engine on the discussion forums and I think that the HTML Codes may complicate the search.
O'Ya, it's fix now. Post away and let me know of any other problems please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks