Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 inc_func_common.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 September 2002 :  09:12:49  Show Profile
File inc_func_common.asp

Following functions may be modified as below:

function HTMLEncode(ByVal pString)
    dim fString
    fString = trim(pString)
    if fString = "" or IsNull(fString) then 
     fString = " "
    else
     fString = replace(fString, ">", "& gt;")
     fString = replace(fString, "<", "& lt;")
    end if
    HTMLEncode = fString
end function


function HTMLDecode(ByVal pString)
    dim fString
    fString = trim(pString)
    if fString = "" then 
     fString = " "
    else
     fString = replace(fString, "& gt;", ">")
     fString = replace(fString, "& lt;", "<")
    end if
    HTMLDecode = fString
end function


function chkString(pString,fField_Type) '## Types - name, password, title, message, url, urlpath, email, number, list
    fString = trim(pString)
    if fString = "" or isNull(fString) then
     fString = " "
     if fFieldType = "displayimage" then fString = ""
     chkString = fString
     Exit function
    else

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 13 September 2002 :  12:01:55  Show Profile
Would you like to give your reasons why they should be modified to what you have proposed?

Support Snitz Forums
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20581 Posts

Posted - 13 September 2002 :  12:58:36  Show Profile  Visit HuwR's Homepage
it would save some code execution
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 13 September 2002 :  13:02:10  Show Profile
Yes! I should have posted the reasons also with the proposed changes. When fString = "" or = " " then there is nothing to Replace. Please ignore the space in "& gt;" and "& lt;". That was to show the code.

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 15 September 2002 :  23:58:05  Show Profile
updated HTMLEncode and HTMLDecode functions, but did not change anything in the chkString function.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07