Line Break Tags - Customer Address Field Invoice

Hi Guys,

We are using Quickfile with an API. When I go into quickfile, I notice that all customer sales invoices in QF are displaying line break details (lots of <br) in the address field which look really unprofessional, this also happens when I raise an customer credit note manually. Please can you provide further guidance on how I can solve or rectify this.

Many Thanks in Advance Andy

Hi @Andy_B

Are the tags <br> or <br/>? Are they added by QuickFile, or through the API?

We allow some HTML tags, but XHTML tags are ignored, so if it’s <br/>, then these won’t create a new line but rather output the tag as it is. A full list can be found here:
Rich Content Support

The tag is as follows …
These occur both on invoices created using the API and also on manual credit notes that I create via QF dashboard!

The tags are < br / > sorry didn’t include in previous response

@Andy_B - I’ve just done a bit of digging on this. The API call that’s creating these invoices are using <br /> as the tag, with a space between the r and /.

Removing this space works fine, so <br/> is accepted as part of the address. So when the API call is made, if you send <br/> for a new line, this should fix it.

However whitespace (including line breaks) before the /> of an empty tag is allowed per the XML (and thus XHTML) spec, and if you’re generating the content with an XML-aware library then you may not have any control over whether the spaces are there or not - e.g. in Java JDOM I believe puts a space whereas xpp3 doesn’t.

Would you consider adding a \s* to the relevant regular expression on your validation side?

Hi Guys thanks for the responses, our developer ‘tom’ caught sight of the earlier suggestions in this thread and jumped straight on to this for me! I asked him how he resolved the problem and simply he said the following …

Hi Andy, I Just replaced <br /> with <br>

Two types of the same tag… both correct in any other circumstances

Hope this helps!

Haa Haa, whenever I refer to the code and copy and paste the b r code in this thread it doesn’t display!

Hi @Andy_B

Glad you managed to resolve this!

I amended your previous post to show the br tags. You can use 2 or 3 backticks (`) around the code to stop it from being processed.

@ian_roberts - I’m not familiar with how this is processed on our end, but I will flag this with a developer to see if anything can be done. I won’t however make any promises.

This topic was automatically closed after 4 days. New replies are no longer allowed.