|
|
Class: HTMLUtilities
Object
|
+--HTMLUtilities
- Package:
- stx:libbasic2
- Category:
- Net-Communication-Support
- Version:
- rev:
1.9
date: 2010/04/12 12:53:03
- user: sr
- file: HTMLUtilities.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
Collected support functions to deal with HTML.
Used both by HTML generators (DocGenerator), HTMLParsers and the webServer.
Therefore, it has been put into libbasic2.
common actions
-
openLauncherOnDisplay: displayName
-
helpers
-
controlCharacters
-
-
escapeCharacterEntities: aString
-
helper to escape invalid/dangerous characters in html strings.
These are:
control characters, '<', '>', '&' and space -> %XX ascii as hex digits
% -> %%
-
extractCharSetEncodingFromContentType: contentTypeLine
-
-
extractMimeTypeFromContentType: contentTypeLine
-
-
unEscape: aString
-
Convert escaped characters in an urls arguments or post fields to their proper characters.
These are:
+ -> space
%XX ascii as hex digits
%% -> %
-
urlEncoded: aString
-
helper to escape invalid/dangerous characters in an urls arguments or post-fields.
see: application/x-www-form-urlencoded
-
withAllSpecialHTMLCharactersEscaped: aStringOrCharacter
-
replace ampersand, less, greater and quotes by html-character escapes
-
withSpecialHTMLCharactersEscaped: aStringOrCharacter
-
replace ampersand, less and greater by html-character escapes
serving-helpers
-
escape: aString
-
helper to escape invalid/dangerous characters in an url's arguments or post-fields.
These are:
control characters, '+', ';', '?', '&' and space -> %XX ascii as hex digits
% -> %%
text processing helpers
-
plainTextOfHTML: htmlString
-
given some HTML, extract the raw text.
Can be used to search for strings in some html text.
|