<%
Private Function URLDecode(byVal encodedstring)
Dim strIn, strOut, intPos, strLeft
Dim strRight, intLoop
strIn = encodedstring : strOut = _
"" : intPos = Instr(strIn, "+")
Do While intPos
strLeft = "" : strRight = ""
If intPos > 1 then _
strLeft = Left(strIn, intPos - 1)
If intPos < len(strIn) Then strRight = Mid(strIn, intPos + 1)
strIn = strLeft & " " & strRight
intPos = InStr(strIn, "+")
intLoop = intLoop + 1
Loop
intPos = InStr(strIn, "%")
Do while intPos
If intPos > 1 Then strOut = strOut & Left(strIn, intPos - 1)
strOut = strOut & Chr(CInt("&H" & mid(strIn, intPos + 1, 2)))
If intPos > (len(strIn)-3) then
strIn = ""
Else
strIn = Mid(strIn, intPos + 3)
End If
intPos = InStr(strIn, "%")
Loop
URLDecode = strOut & strIn
End Function
strLink = FP_FieldLink(fp_rs,"Link")
Response.Write URLDecode(strLink)
%> |
Request for Answer Clarification by
webdesignguy-ga
on
16 Jun 2003 15:33 PDT
Wow, that's quite a chunk of code to get this to work. It appears
that you are trying to isolate and eliminate the % sign from the
results. This would solve the immediate issue, but unless I'm missing
something, it would not solve the larger issue.
Perhaps I am very much mistaken, but isn't there an easy way to grab
HTML (of all sorts) from a database field and then not only display
it, but to send it to the HTML stream as HTML, rather than as text.
For example, what happens if I want to include <BR>, links etc. Is
there some small thing that I can do to make the HTML be processed
that is found in the database? I know I have seen this done before in
other shopping cart software programs.
Thanks for any additional help.
Best regards,
WebDesignGuy
|