If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Managing Customers and Orders / V157b order status comments have additional empty lines between the text

V157b order status comments have additional empty lines between the text

Started by marton_1 on 16 Feb 2021, 9:57 PM · Views: 2,277

Results 1 to 7 of 7
16 Feb 2021, 9:57 PM
#1
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

V157b order status comments have additional empty lines between the text

V157b responsive classic

When I add comments to update a customer order status it looks OK but when I send the email it is not wsywig, there are additional empty lines added to my comments; the standard zen cart beginning and end in navy are OK.
When I go back in admin and check the comments they also now have these additional empty lines.

My text editor is CKEditor.

I use the same text editor with the same settings to write product descriptions with no additional empty lines added.

Here is a test in the German language, I get the same effect in English; maybe I can configure the text editor somewhere?

Sehr geehrte(r) marton hasenberg,
Bestellnummer: 1786
Bestelldetails
Bestelldatum: Mittwoch, 27. Januar 2021
Die Kommentare für Ihre Bestellung lauten:

This is a test to check

how does it look?

Just a status comment

Usually, I add a discount for repeat orders.

Der Status Ihrer Bestellung hat sich nicht ge�ndert:
Aktueller Status: Bearbeitung
Bitte antworten Sie auf diese E-Mail, wenn Sie Fragen haben.
Simones Hunde Design

17 Feb 2021, 12:13 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: V157b order status comments have additional empty lines between the text

This is a result of continued oversanitization. There is/has been some improvement, but there still is (as indicated) these extra lines.

Changing the editor's mode to "source mode" I believe would allow entering the content without the html characters including the extra line endings... I likely am wrong about how to not have those extra spaces, though wouldn't be the first time.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Feb 2021, 5:15 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: V157b order status comments have additional empty lines between the text

Extra sanitization is applied to the "first" comment on any order. This is in case the customer enters anything malicious in it, so that it can't negatively harm your store.
Subsequent comments are normally only entered via an Admin and thus the sanitization is less aggressive.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Feb 2021, 4:04 PM
#4
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: V157b order status comments have additional empty lines between the text

mc12345678:

This is a result of continued oversanitization. There is/has been some improvement, but there still is (as indicated) these extra lines.

Changing the editor's mode to "source mode" I believe would allow entering the content without the html characters including the extra line endings... I likely am wrong about how to not have those extra spaces, though wouldn't be the first time.

You mean when I write the comment in Admin to click on the "source" box above right?
Tried that but sadly the same issue, you will have to go down the mine and look for another nugget with a fix. :)

Is it possible to configure the CKeditor anywhere? There is no CK entry in admin/configuration in English or German.
I am using a new 157b installation.

17 Feb 2021, 7:03 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: V157b order status comments have additional empty lines between the text

marton_1:

Is it possible to configure the CKeditor anywhere?
/editors/ckeditor/config.js

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

17 Feb 2021, 9:31 PM
#6
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: V157b order status comments have additional empty lines between the text

I tried commenting out the AutoParagraph but it did not help

When I write my comment and look at it in source mode it looks like this

<p>This is a test<br />
try two lines</p>

<p>how does this look</p>

Then I send it and it now looks like this

<p>This is a test<br /><br />
try two lines</p><br />
<br />
<p>how does this look</p>     

Somehow it has picked up some extra <br />s

18 Feb 2021, 1:02 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: V157b order status comments have additional empty lines between the text

marton_1:

I tried commenting out the AutoParagraph but it did not help

When I write my comment and look at it in source mode it looks like this

<p>This is a test<br /> try two lines</p> <p>how does this look</p> ``` > > Then I send it and it now looks like this > ``` <p>This is a test<br /><br /> try two lines</p><br /> <br /> <p>how does this look</p> ``` > > Somehow it has picked up some extra <br />s There's most likely a call to **nl2br **(converting new-lines to <br>'s) somewhere in the processing.