Files
Asish 73fb62c120 [LLM Classification] Do not HTML-encode re-used tags again (#573)
* [LLM Classification] Do not HTML-encode re-used tags again

The tags of an entry are stored HTML-encoded: `applyClassification()`
encodes the tags returned by the LLM with `htmlspecialchars()`, like
SimplePie does for the categories of the feeds.

When an already classified entry is updated without any change to its
prompt, the extension re-uses the stored tags instead of calling the
LLM again, but passed them as-is to `applyClassification()`, which
encoded them a second time. So a tag such as `R&D` became `R&D` in
the database after classification, then `R&D` after the next
such update, and so on. When a list of allowed tags is configured, the
encoded tags did not match the list anymore (`R&D` is not `R&D`),
and were silently removed from the entry.

Decode the stored tags before re-using them, so that they go through
the same encoding and allow-list check as the tags returned by the LLM.
Decoding first also lets tags match a configured prefix containing such
characters.

Bump the extension version to 0.3.2.

* [LLM Classification] Decode single quotes in re-used tags too
2026-11-01 20:23:47 +01:00

10 lines
239 B
JSON

{
"name": "LLM Classification",
"author": "Alkarex",
"description": "Tag incoming articles by calling an OpenAI-compatible LLM API",
"version": "0.3.2",
"entrypoint": "LlmClassification",
"type": "user",
"compatibility": "1.28.2"
}