Project60 / Project60/org.project60.banking

Bug: Values in JavaScript objects are not escaped correctly in templates

Open Beginner friendly
#498 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
22
Forks
45
Avg merge
3d 15h
Merged PRs (30d)
7

Description

For some transactions, I write the campaign title to btx.source via lookup action.

For a campaign title that contained quotation marks, I got a syntax error in the JavaScript code.

https://github.com/Project60/org.project60.banking/blob/4be17a2b308518b69b8b6e4a93823953793fff24/templates/CRM/Banking/PluginImpl/Matcher/DefaultOptions.suggestion.tpl#L302-L304

Image Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at templates/CRM/Banking/PluginImpl/Matcher/DefaultOptions.suggestion.tpl#L302-L304, where the campaign title is written into the JavaScript object. Inspect how quotation marks are handled, then verify with a title containing quotation marks that the generated JavaScript remains valid and btx.source receives the full title.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
67/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.