<%
'*******************************
'Fonction: htmlencode (repos)
'Paramètre: repos, chaîne à coder
'Auteur: Alixi
'Date: 2007/7/15
'Description: Convertir le code HTML
'Exemple: htmlencode ("<p> bienvenue dans <br> Alixi </p>")
'*******************************
Functionhtmlencocode (repos)
Dimstr: str = repos
Ifnotisnull (str) puis
Str = unchecktr (str)
Str = remplacer (str, "&", "&")
Str = remplacer (str, ">", ">")
Str = remplacer (str, "<", "<")
Str = remplacer (str, chr (32), "")
Str = remplacer (str, chr (9), "")
Str = remplacer (str, chr (9), "")
Str = remplacer (str, chr (34), "")
Str = remplacer (str, chr (39), "'")
Str = remplacer (str, chr (13), "")
Str = remplacer (str, chr (10), "<br>")
Htmlencode = str
Endire
Finition de fin
'Code HTML de conversion inverse
Functionhtmldecode (repos)
Dimstr: str = repos
Ifnotisnull (str) puis
Str = remplacer (str, "&", "&")
Str = remplacer (str, ">", ">")
Str = remplacer (str, "<", "<")
Str = remplacer (str, "", chr (32))
Str = remplacer (str, "", chr (9))
Str = remplacer (str, "", chr (9))
Str = remplacer (str, "", chr (34))
Str = remplacer (str, "'", chr (39))
Str = remplacer (str, "", chr (13))
Str = remplacer (str, "<br>", chr (10))
HtmlDecode = str
Endire
Finition de fin
%>