quintodrome/core/external
Deluan Quintão 7e083e0795
fix: split html sanitization from plaintext handling (#5403)
* fix: split html sanitization from plaintext handling

Add a dedicated SanitizeHTML helper for HTML-rendered values so entity-encoded markup is decoded before bluemonday sanitization. Use the new helper for the login welcome message and artist biographies while preserving SanitizeText semantics for lyrics and other plaintext callers. Add regression coverage for both helpers and the serveIndex welcomeMessage path.

* docs: add SanitizeText and SanitizeHTML godoc

Signed-off-by: Deluan <deluan@navidrome.org>

* fix: preserve plain text in artist biographies

Revert artist biography storage to SanitizeText so entity-encoded plain text remains decoded for Subsonic consumers. This avoids double-escaping values like R&B in XML responses while keeping the new welcomeMessage HTML sanitization in place, and adds a regression test covering the biography storage behavior.

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2026-04-23 17:53:28 -04:00
..
extdata_helper_test.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
extdata_suite_test.go refactor: external_metadata -> external.Provider (#3903) 2025-04-08 21:11:09 -04:00
provider.go refactor: extract song-to-library matcher to core/matcher package (#5348) 2026-04-12 16:47:22 -04:00
provider_albumimage_test.go refactor: extract song-to-library matcher to core/matcher package (#5348) 2026-04-12 16:47:22 -04:00
provider_artistimage_test.go refactor: extract song-to-library matcher to core/matcher package (#5348) 2026-04-12 16:47:22 -04:00
provider_similarsongs_test.go refactor: extract song-to-library matcher to core/matcher package (#5348) 2026-04-12 16:47:22 -04:00
provider_topsongs_test.go feat(matcher): add Matcher.PreferStarred option to bias fuzzy matcher toward starred/high-rated tracks (#5387) 2026-04-19 12:54:41 -04:00
provider_updatealbuminfo_test.go refactor: extract song-to-library matcher to core/matcher package (#5348) 2026-04-12 16:47:22 -04:00
provider_updateartistinfo_test.go fix: split html sanitization from plaintext handling (#5403) 2026-04-23 17:53:28 -04:00