.CONVERT TEXT TO HTML
This subroutine converts a text field to HTML encoding.
Usage:
PASS <html> FIELD SHARE? Y
PASS <text> FIELD SHARE? N
PASS <html_header> FIELD SHARE? N
PASS <html_footer> FIELD SHARE? N
GOSUB --- .CONVERT TEXT TO HTML
* check for errors
IF --- .CONVERT TEXT TO HTML NE
Description:
This subroutine converts a text field to HTML encoding. The first two parameters are required, if any are missing the subroutine will CANCEL. The <html_header> and <html_footer> parameters are optional.
<html> returns the converted <text> (Required). This must be PASSed with Share "Y" to return the value.
<text> is the text data you want converted to html (Required).
<html_header> is the html code you want inserted at the beginning of <html> (Optional). If not PASSed or blank, it will default to <HTML><BODY><FONT FACE=HALVETICA>
<html_footer> is any html code you want added to the end of <html> (Optional).
This routine will replace any end of line characters (Go-Return) with <br> and a pair of end of line characters with <p>. The symbols <, >, &, and hard spaces (underscores) will be converted to their HTML equivalents.
If <html> is too small to contain the converted text, --- .CONVERT TEXT TO HTML will contain 'Data was truncated'.
Comments:
Read what other users have said about this page or add your own comments.
--
JeanNeron - 2012-02-03