Shopping at LEGO or Amazon?
Please use our links: LEGO.comAmazon
As an Amazon Associate we earn from qualifying purchases.

Understand the "description" field in API

LebosteinLebostein GermanyMember Posts: 42
For example the description field of the passenger train 60197 (see attached file).
There are html tags like <p> or <li> and I can see non-html tags like \n or \t
In this case this seems no clean html or how I can understand this?

Comments

  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,760
    It looks to be the way the json encoder has dealt with it. It's saved in the database as plain text, which has new lines and tabs in it in addition to HTML tags.

    Strip them out and ignore them...
  • benbacardibenbacardi EnglandMember Posts: 654
    That's just the way JSON encodes literal new lines and tabs in the string. You shouldn't need to do anything with them, not even strip them, depending on what you're doing with the HTML output.
Sign In or Register to comment.

Shopping at LEGO.com or Amazon?

Please use our links: LEGO.com Amazon

Recent discussions Categories Privacy Policy Brickset.com

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Brickset.com is a participant in the Amazon Services LLC Associates Program, the Amazon.com.ca, Inc. Associates Program and the Amazon EU Associates Programme, which are affiliate advertising programs designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.

As an Amazon Associate we earn from qualifying purchases.