InstantASP Community Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        


Bug in HTMLizeString() causes... Expand / Collapse
Author
Message
Posted 10/10/2007 06:41:02
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 19/10/2007 09:24:31
Posts: 8, Visits: 37
The function InstantASP.Common.Text.Helpers.HTMLizeString() performs the following string replacements:

sb.Replace(Chr(13), "<br>")
sb.Replace(vbCrLf, "<br>")
sb.Replace("\n", "")


I believe the first two lines should be swapped around, because browsers will represent newlines as Chr(13)&Chr(10) (i.e. vbCrLf), so when you do the first replacement, it will become "<br>" & Chr(10), and VB.NET understands the remaining Chr(10) as a further linebreak. Since both linebreaks and < br > tags are rendered as newlines inside < PRE > tags, this doubles the number of linebreaks displayed.

If you swapped the order of the lines, both CR-LF sequences and single CR characters would be converted to "<br>" without any unwanted leftovers.

This bug is frustrating our users, because not only does it mean posts look ugly, each time they edit their posts, the number of linebreaks is again doubled.

Can you give me an idea on when we can expect the next service pack for Instant Forums? Thanks.
Post #13424
Posted 10/10/2007 09:08:46
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 2 days ago @ 13:47:50
Posts: 266, Visits: 598
Hi Steve,
Thanks very much for the feedback, we'll ensure that this goes into the next version. At the moment we have no fixed date for the next forum update, although I would expect announcements of dates and schedules for that to come in early november, after the final commercial release of the InstantKB software.


Kindest Regards,

James Trott
Developer

Post #13425
Posted 31/03/2008 17:29:38
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Administrators
Last Login: 2 days ago @ 13:47:50
Posts: 266, Visits: 598
Issue transferred to KB for Tracking:

http://kb.instantasp.co.uk/Issues/Bug-in-HTMLizeString


Kindest Regards,

James Trott
Developer

Post #13818
« Prev Topic | Next Topic »

Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ryan Healey

Permissions Expand / Collapse

All times are GMT, Time now is 2:21pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 8 queries. Compression Disabled.
Home | Products | Purchase | Support | Company | Contact Us
Privacy Statement | © 1999-2007 InstantASP Limited. All Rights Reserved.