eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTMLUtilities':

Home

everywhere
www.exept.de
for:
[back]

Class: HTMLUtilities


Inheritance:

   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

Description:


Collected support functions to deal with HTML.
Used both by HTML generators (DocGenerator), HTMLParsers and the webServer.
Therefore, it has been put into libbasic2.


Class protocol:

common actions
o  openLauncherOnDisplay: displayName

helpers
o  controlCharacters

o  escapeCharacterEntities: aString
helper to escape invalid/dangerous characters in html strings.
These are:
control characters, '<', '>', '&' and space -> %XX ascii as hex digits
% -> %%

o  extractCharSetEncodingFromContentType: contentTypeLine

o  extractMimeTypeFromContentType: contentTypeLine

o  unEscape: aString
Convert escaped characters in an urls arguments or post fields to their proper characters.
These are:
+ -> space
%XX ascii as hex digits
%% -> %

o  urlEncoded: aString
helper to escape invalid/dangerous characters in an urls arguments or post-fields.
see: application/x-www-form-urlencoded

o  withAllSpecialHTMLCharactersEscaped: aStringOrCharacter
replace ampersand, less, greater and quotes by html-character escapes

o  withSpecialHTMLCharactersEscaped: aStringOrCharacter
replace ampersand, less and greater by html-character escapes

serving-helpers
o  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
o  plainTextOfHTML: htmlString
given some HTML, extract the raw text.
Can be used to search for strings in some html text.



ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 09:56:25 GMT