NetTalk Central

Author Topic: Line feed in xHTML  (Read 4338 times)

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Line feed in xHTML
« 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


Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Line feed in xHTML
« Reply #1 on: June 16, 2016, 07:29:45 PM »
In xHtml you have to use <br /> insted of <br>.

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Line feed in xHTML
« Reply #2 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

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: Line feed in xHTML
« Reply #3 on: June 22, 2016, 11:15:07 PM »
Hallo Mark,

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


Robert

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Line feed in xHTML
« Reply #4 on: July 01, 2016, 01:27:06 PM »
Worked great. Thanks.