Repository navigation
fix: do not double-encode titles and authors when importing JSON - #9556
Merged
Alkarex merged 4 commits intoNov 12, 2026
Merged
Conversation
FreshRSS exports titles and authors HTML-encoded, and the JSON import encoded them again since FreshRSS#9168, so restoring a ZIP export turned "Post & more" into "Post & more". Decode before encoding.
Alkarex
approved these changes
Nov 12, 2026
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restoring a FreshRSS ZIP export (or importing its starred JSON) double-encodes every article title and author that contains
&,<,>or quotes:The UI then shows "Post 1 & more", and each further export/import cycle adds another layer.
Titles and authors are stored HTML-encoded and exported that way (
Entry::toGReader()), and since #9168importJson()encodes them again. They are now decoded before being encoded, so FreshRSS's own exports come back unchanged and plain-text titles from other readers are still escaped as #9168 intended.Tested with
freshrss/freshrss:edge(1.30.5-dev): actualize a feed with&in titles and authors,cli/export-zip-for-user.php,cli/import-for-user.phpinto a new user. Before:&amp;; after: identical to the original, with read, starred and labels still restored. 1.30.4 has the same bug.php -lpasses; PHPUnit/PHPStan not run.