Goto main content

html2text

Convert html text to plain text.

HTML2TEXT

NAME

html2text - Converts html text to plain text

SYNOPSIS

html2text(string,allowable)

PARAMETERS

string
The input string. allowable One can use the optional second parameter to specify tags which should not be converted.

RETURN

Returns the converted string

EXAMPLES

in:  res={{html2text('$buf',"<script>")}}.
out: res=paraòÒ ăаgraph
sednove [ http://test.com ]
is the best<script>
        var a="this one is tricky</script>";

a
newline.

in:  res={{html2text('$buf')}}.
out: res=paraòÒ ăаgraph
sednove [ http://test.com ]
is the best
a
newline.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.