Home

>

Tools

>

Ghost

>

Releases

>

5.70.1

Ghost Release: 5.70.1

Tag Name: v5.70.1

Release Date: 10/20/2023

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost v5.70.1: HTML Import Bugfix

This patch release fixes a critical bug that was causing errors when using <br> tags in certain situations when creating posts with the HTML source parameter (?source=html). The update improves HTML-to-Lexical conversion to properly handle line breaks in various contexts and fixes an issue with button href values being incorrectly prefixed.

Highlight of the Release

    • Fixed errors when using <br> tags in HTML content imports
    • Improved node normalization for handling line breaks in top-level text nodes
    • Fixed button href values being incorrectly prefixed with about:blank for hash URLs

Migration Guide

No migration steps are required for this patch release. The update can be installed normally without any additional configuration or data migration.

Upgrade Recommendations

This patch release is recommended for all Ghost installations, especially for sites that:

  • Use the API to create posts with HTML content via the ?source=html parameter
  • Import content from external sources in HTML format
  • Have experienced errors related to line breaks in imported HTML content

The update addresses specific edge cases in HTML content handling that could cause errors during content creation or import. Upgrading will provide a more reliable experience when working with HTML content that contains line breaks and button elements with hash URLs.

Bug Fixes

HTML Import Fixes

  • Fixed errors that occurred when using <br> tags in certain situations when creating posts with the ?source=html parameter
  • Improved node normalization to properly handle <br> tags in top-level text nodes
  • Fixed handling of <br> tags that appear after nested block-level elements
  • Fixed an issue where button href values with hash URLs (e.g., #section) were being incorrectly prefixed with about:blank

These fixes were implemented by updating the @tryghost/kg-html-to-lexical dependency, which handles the conversion of HTML content to Ghost's Lexical editor format.

New Features

No new features were introduced in this patch release. This is a bugfix release focused on improving the stability of HTML content imports.

Security Updates

No security fixes were included in this patch release.

Performance Improvements

No specific performance improvements were included in this patch release. The focus was on fixing bugs related to HTML content imports.

Impact Summary

This patch release fixes a specific bug in Ghost's HTML import functionality that was causing errors when processing content with <br> tags in certain contexts. The fix improves the reliability of creating posts via the API using the ?source=html parameter, particularly when the HTML content contains line breaks in top-level text nodes or after nested block-level elements.

Additionally, the update fixes an issue where button href values with hash URLs (like #section) were being incorrectly prefixed with about:blank, which could cause navigation problems.

While this is a targeted bugfix release with minimal changes, it significantly improves the reliability of HTML content imports, which is an important workflow for content migration, programmatic content creation, and integration with external systems.

Full Release Notes

Statistics:

File Changed3
Line Additions31
Line Deletions30
Line Changes61
Total Commits2

User Affected:

  • Can now use `<br>` tags in HTML content without encountering errors when importing via the HTML source parameter
  • Will experience more reliable HTML imports with proper handling of line breaks in text nodes
  • Will see correct rendering of button links with hash URLs (no more `about:blank` prefix)

Contributors:

renovate[bot]github-actions[bot]