The problem is that if i don't put value="" then entries with more than two words don't get stored properly in the hidden fields.
i.e.
<INPUT type="hidden" id=entry name=entry value=<%=Request("entry")%>>
becomes
<INPUT type="hidden" id=entry name=entry value=This is the submitted entry>
and everything after 'This' is dropped.
So i use "'s
i.e.
<INPUT type="hidden" id=entry name=entry value="<%=Request("entry")%>">
becomes
<INPUT type="hidden" id=entry name=entry value="This is the submitted entry">
And that works fine EXCEPT when the form value contains a "
so I end up with:
<INPUT type="hidden" id=entry name=entry value="So she said, "hey!" and then left">
and when this value is passed to [page 3] it only passes: "So she said, " and drops the rest.
I'm filtering ' already with this function:
Function CleanSQL(strng)
Dim regExp, retVal, repStr
repStr = "'"
set regExp = new RegExp
regExp.Pattern = "'"
regExp.IgnoreCase = true
regExp.Global = true
retVal = regExp.Replace(strng, repStr)
CleanSQL = retVal
End Function
But when i try to filter " by replacing
regExp.Pattern = "'"
with
regExp.Pattern = """
I get this error:
Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
submit.asp, line 29, column 21
regExp.Pattern = """
so if any of you know the escape character for " in asp, or know of a better way i should be doing this, i would GREATLY appreciate it. . . i may even name my first born after you ;)

New Topic/Question
Reply




MultiQuote




|