Skip to content

Releases: NEOSidekick/NEOSidekick.HtmlContent

v2.0.3: Fix HTML parsing to preserve script tags and UTF-8 encoding

Choose a tag to compare

@rolandschuetz rolandschuetz released this 20 Jan 19:46
BUGFIX: Fix HTML parsing to preserve script tags and UTF-8 encoding

When using DOMDocument::loadHTML, script tags at the beginning of the
content were being moved to the head and subsequently lost when
extracting the body content. Additionally, UTF-8 characters were not
always parsed correctly.

This change wraps the input HTML in a body tag and adds an XML encoding
declaration before loading it into DOMDocument. This forces DOMDocument
to keep script tags in the body and correctly parse UTF-8 characters.

Additionally, moved JavaScript detection and removal logic to the DTO
and added comprehensive unit tests.

v2.0.2: Compatibility with NEOSidekick.AiAssistant

Choose a tag to compare

@rolandschuetz rolandschuetz released this 17 Jan 22:33

Resolved naming conflict in EelHelper namespace

v2.0.1: Edge case fixes

Choose a tag to compare

@rolandschuetz rolandschuetz released this 30 Sep 22:43

Bug fixes

  • Fix: No error when HTML property is empty or whitespace (prevents “DOMDocument::loadHTML(): Argument #1 must not be empty”).
  • Fix: No false “autofixed closing tags” notice for plain text and valid inline SVG; only fatal libxml issues are treated as invalid; benign warnings (incl. unknown tag 801) are ignored.
  • Improvement: More robust post-processing (cleans libxml error buffer, restores state, safer body extraction) with proper handling of mixed HTML + inline SVG.

v2.0.0: Improved error handling and new namespace

Choose a tag to compare

@gradinarufelix gradinarufelix released this 19 Jun 14:41

There are no more errors about unknown tags, as we now omit this error code. The reason is, that the LibXML library does not correctly detect valid HTML tag names. Moreover, missing closing tags are now automatically fixed and a warning is displayed if there are any.

We also moved the package from codeq/htmlcontent to neosidekick/htmlcontent. To migrate, please do the following steps:

  • Run node migration: ./flow node:migrate --version 20240619160000
  • The role was renamed from CodeQ.HtmlContent:Editor to NEOSidekick.HtmlContent:Editor. Please adapt this if you use it as a parentRolein your Policy.yaml. Don't forget to re-add the new role to the users.
  • The following privilege targets were renamed, please change it in your Policy.yaml
    • NEOSidekick.HtmlContent:Create
    • NEOSidekick.HtmlContent:Edit
    • NEOSidekick.HtmlContent:Remove
    • NEOSidekick.HtmlContent:EditProperty

Full Changelog: v1.0.0...v2.0.0

v1.0.0 Stable Release

Choose a tag to compare

@rolandschuetz rolandschuetz released this 02 Mar 14:00
TASK: Add demo video can exclude .idea folder