{"id":18546177,"date":"2025-07-08T12:42:35","date_gmt":"2025-07-08T12:42:35","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/attribute-formatting-issue\/"},"modified":"2025-07-08T12:42:35","modified_gmt":"2025-07-08T12:42:35","slug":"attribute-formatting-issue","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/attribute-formatting-issue\/","title":{"rendered":"Attribute formatting issue"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is somewhat related to <a href=\"https:\/\/wordpress.org\/support\/topic\/invoices-are-no-longer-showing-size-variation\/\">this topic<\/a>. But our friendly neighbourhood moderator closed it and removed some info so I&#8217;m starting this new topic to see if we can get a fix. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is not really a bug but maybe a improvement request. \ud83d\ude42 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So there was a bug, which you guys fixed, that removed some variation attributes. The issue now is purely with formatting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have not fully investigated myself but some extras are printed in the HTML like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;dl class=\"extras\"&gt;<br \/>  &lt;dt&gt;Name:&lt;\/dt&gt;<br \/>  &lt;dd&gt;Value&lt;\/dd&gt;<br \/>&lt;\/dl&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But some attributes are printed with just &lt;br&gt; and no space between the name + &#8220;:&#8221; and the value. The full &#8220;&lt;td class=&#8221;product-name&#8221;&gt;&#8221; looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;td class=\"product-name\"&gt;<br \/>  &lt;div class=\"name\"&gt;Oxford - T\u00e4ckplugg med M8 &amp;amp; M10 G\u00e4nga F\u00f6r Backspegel&lt;\/div&gt;.<br \/>  &lt;br&gt;<br \/>  Name1:Value1<br \/>  &lt;dl class=\"extras\"&gt;<br \/>    &lt;dt&gt;Name2:&lt;\/dt&gt;<br \/>    &lt;dd&gt;Value2&lt;\/dd&gt;<br \/>  &lt;\/dl&gt;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&lt;\/td&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can see it in this screenshot from a removed replied @priyankajagtap wrote:<br \/><a href=\"https:\/\/prnt.sc\/YBx8nQtU5p5L\">https:\/\/prnt.sc\/YBx8nQtU5p5L<\/a><br \/><a href=\"https:\/\/prnt.sc\/qU0FVPBcvghH\">https:\/\/prnt.sc\/qU0FVPBcvghH<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can see that it outputs &#8220;Extra Accessories:Extra RAM&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is a screenshot from an actual PDF from an actual order:<br \/><a href=\"https:\/\/prnt.sc\/I4wr4FACpb_y\">https:\/\/prnt.sc\/I4wr4FACpb_y<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can see that &#8220;Artikelnr&#8221; (article number) has a nice format but &#8220;G\u00e4ngstorlek&#8221; does not.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So basically it would be nice if the extra attributes also was formatted with a &lt;dl&gt; tag or similar.<\/p>\n","protected":false},"template":"","class_list":["post-18546177","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18546177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18546177\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18546177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}