Hanabi9248 opened a new pull request, #21751:
URL: https://github.com/apache/echarts/pull/21751

   ## Brief Information
   
   - [x] bug fixing
   - [ ] new feature
   - [ ] others
   
   ### What does this PR do?
   
   Preserves literal dollar sequences in values inserted into formatter 
templates.
   
   ## Details
   
   ### Before: What was the problem?
   
   Formatting `{a}` with a series name of `Price $$` returns `Price $`. A name 
containing `$&` can reinsert the placeholder instead of displaying the name, 
including when HTML encoding is enabled.
   
   Both `formatTpl` and `formatTplSimple` pass values directly as replacement 
strings, so `String.replace` interprets these sequences.
   
   ### After: How does it behave after the fixing?
   
   Callback replacements insert the values literally. HTML encoding and indexed 
series formatting stay unchanged.
   
   ## Document Info
   
   - [x] This PR doesn't relate to document changes
   
   ## Misc
   
   ### Related test cases or examples to use the new APIs
   
   Three tests cover literal replacement sequences with and without HTML 
encoding, simple templates, indexed series, and numeric values. All three fail 
before the fix.
   
   Validation: 197 unit tests pass; `npm run build:lib`, `npm run checktype`, 
ESLint on the changed files, and `git diff --check` pass. Browser visual tests 
were not run.
   
   ### Merging options
   
   - [x] Please squash the commits into a single one when merging.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to