NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: markster on June 16, 2016, 02:54:57 PM

Title: Line feed in xHTML
Post by: markster on June 16, 2016, 02:54:57 PM
I'm trying to display some HTML text on a form. The text is entered in a standard TEXT field, which allows line feeds, ie CHR(10) like the following:

Some Text.
Here's a new line.

However, later when I want to display this text as xHTML by adding a <p> tag at the beginning and a </p> tag at the end, it displays like this:

Some Text. Here's a new line.

If I try to add the <br> tag between the two "sentences" of  text, the form will crash when it tries to load the text. Yes, I do have the Allow xHTML tag checked! I have also tried checking the Allow unsafe xHTML. Still crashes every time.

Thanks, Mark

Title: Re: Line feed in xHTML
Post by: Niels Larsen on June 16, 2016, 07:29:45 PM
In xHtml you have to use <br /> insted of <br>.
Title: Re: Line feed in xHTML
Post by: markster on June 22, 2016, 07:56:42 AM
Bruce, thanks that took care of the issue. Along the same lines, is there some coding trick to getting an image to display in xHTML. I've been trying to use the following code:

'<img src="'&Clip(LOC:ImageName)&'" height="24" width="24">'

This crashes the app when trying to load.

Thanks,

Mark
Title: Re: Line feed in xHTML
Post by: Robert Iliuta on June 22, 2016, 11:15:07 PM
Hallo Mark,

try this:
'<img src="'&Clip(LOC:ImageName)&'" height="24" width="24" />'


Robert
Title: Re: Line feed in xHTML
Post by: markster on July 01, 2016, 01:27:06 PM
Worked great. Thanks.