Skip to content

fix(integration): keep dollar signs in custom integration values - #5142

Open
bardrop wants to merge 1 commit into
RSSNext:devfrom
bardrop-oss:fix-integration-dollar
Open

bardrop wants to merge 1 commit into
RSSNext:devfrom
bardrop-oss:fix-integration-dollar

Conversation

@bardrop

@bardrop bardrop commented Nov 25, 2026

Copy link
Copy Markdown

Description

Custom integrations change the entry text when it contains $:

value sent
Costs $$5 Costs $5
R$& more R[title] more
$$ math block in [content_markdown] $

replaceAll(placeholder, value) reads $$, $&, $` and $' in the value as replacement patterns. With $` or $', a part of the template is inserted, so a JSON body can become invalid.

The placeholders were also replaced one after the other, so a title like [url] was replaced by the URL in the next step.

Now all placeholders are replaced in one pass with a replacer function.

Tests

Added to custom-integration-manager.test.ts; 3 of the 4 new tests fail before the change. vitest run src/modules/integration: 23 passed. eslint and prettier are clean for both files.

replaceAll read $$, $&, $` and $' in the title, content and other values
as replacement patterns. Placeholders are now replaced in one pass, so a
placeholder-like text in a value is kept too.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant