Forums

ASP

This topic is locked

Filtering form fields (news, cms, etc.)

Posted 31 Jul 2006 15:46:47
1
has voted
31 Jul 2006 15:46:47 Christian Houmann posted:
In order to make my pages xhtml compliant, I have to filter the danish characters, when a record is inserted/updated.
I found the place in the insert (shown below <b>update</b> generated code (the bold text is my replace function):

If (MM_altVal &lt;&gt; "" Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'" Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''" & "'"
<b>
'Change danish characters in formfields
MM_formVal = replace(MM_formVal,"""","&#8221;"
MM_formVal = replace(MM_formVal,"æ","&aelig;"
MM_formVal = replace(MM_formVal,"ø","&oslash;"
MM_formVal = replace(MM_formVal,"å","&aring;"
MM_formVal = replace(MM_formVal,"Æ","&AElig;"
MM_formVal = replace(MM_formVal,"Ø","&Oslash;"
MM_formVal = replace(MM_formVal,"Å","&Aring;"</b>

It works fine, and even though I have made a snippet with the code, I still have to remeber putting it in, every time a use the insert/update behavior.
Question:
Is it possible to make Dreamweaver do this function as standard, every time I use the behavior?
(I suppose it is, but have never "played" with extension development...)

Reply to this topic