Platforms to show: All Mac Windows Linux Cross-Platform

DecodingFromHTMLMBS(s as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method String MBS Util Plugin 2.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Decodes a string with HTML escaped characters.
Example
dim html as string = "<p><B>Gr&uuml;&szlig;e</B></P>"
dim htmltext as string = RemoveHTMLTagsMBS(html)
dim text as string = DecodingFromHTMLMBS(htmltext)

MsgBox text // shows: Grüße

The source string is converted to a native string if it is not allready in ASCII. Than for every character the functions looks for the unescaped character code and returns a normal unicode string.

e.g. "M&uuml;nchen" -> "München"

This functions uses Xojo unicode strings, so you may need to convert back to a NativeString before saveing the string to a file. (using e.g. ConvertEncoding(string, encodings.UTF8))

May return "" on low memory conditions.
Strings and encoding work only perfectly for RB 4.5 or newer.

Speed optimized in version 2.8 to be a hundret times faster.
Added Linux support in v5.1.

The result of this function is unpredictable on bad input strings.
(e.g. no encoding, or encoding does not match the content of the string)

Some examples using this global method:

Some FAQ entries about this method:

Blog Entries

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...