mhaack / helix-importer

Foundation tools for importing website content into that can be consumed in an Helix project.
Apache License 2.0
0 stars 3 forks source link

[JCR Importer] incorrect <p> added in richtext within a block #42

Open mhaack opened 1 week ago

mhaack commented 1 week ago
+-----------------------------------------------------------------------------------------------------+
| footnote                                                                                            |
+=====================================================================================================+
| Originally published in _[MicroScope](https://www.computerweekly.com/microscope/)_ on Jun 23, 2023. |
+-----------------------------------------------------------------------------------------------------+

In JCR it becomes

<block sling:resourceType="core/franklin/components/block/v1/block" jcr:primaryType="nt:unstructured" name="Footnote" content="&lt;p>Originally published in &lt;/p>&lt;em>&lt;a href=&quot;https://www.computerweekly.com/microscope/&quot;>MicroScope&lt;/a>&lt;/em>&lt;p> on Jun 23, 2023.&lt;/p>" model="footnote" />

There are line breaks added before/after the link. In happens an richtext inside an block

The corresponding model. It happens for other models with rich text fields as well.

  {
    "id": "footnote",
    "fields": [
      {
        "component": "richtext",
        "name": "content",
        "label": "Content",
        "valueType": "string"
      }
    ]
  },
mhaack commented 1 week ago

The HTML should be

<p>Originally published in <em><a href="https://www.computerweekly.com/microscope/">MicroScope</a></em> on Jun 23, 2023.</p>