Developer forum

Forum » Swift » Order comments and line breaks

Order comments and line breaks

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Looks like order comments are messed up when navigating the cart; a br element is inserted for line breaks. Steps:

1. Check out as normal

2. On the last step add the following order comment:

Test line 1
Test line 2
3. Click Back to delivery

4. Click Payment

The order comment now reads as:

Test line 1<br />Test line 2

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Yes.

In OrderComment.cshtml change line 4 to this - using the .Clean postfix:

string comment = !string.IsNullOrWhiteSpace(GetString("Ecom:Order.Customer.Comment.Clean")) ? GetString("Ecom:Order.Customer.Comment.Clean") : string.Empty;

I have made a pull.

Votes for this answer: 1

 

You must be logged in to post in the forum