Prova sostituendo gli spazi, con la stringa "spazio" in HTML.
codice:
FUNCTION toHTML_CRLF(str)
strTmp = str
if len(strTmp) > 0 then
stringaFormat = replace(strTmp, " ", "")
stringaFormat = replace(stringaFormat, CHR(10), "
")
toHTML_CRLF = stringaFormat
end if
END FUNCTION
Non si vede nella funzione perchè ovviamente il forum lo traduce in uno spazio.
Per copiare la tua funzione, quota il mio post e la trovi scritta correttamente.
La stringa da inserire è &.nbsp; senza il . fra & e nbsp; ... spero d'esser stato chiaro e d'aiuto.