chatwoot/app/javascript/shared/helpers/specs
Sivin Varghese b429ce0ad5
fix: Prevent template variables from becoming links (#10725)
# Pull Request Template

## Description

**Issue**
This PR fixes template variables in messages (e.g., {{customer.name}})
that were being incorrectly converted to clickable links by the
`MessageFormatter's linkify` functionality. This caused formatting
issues and broken links.

**Solution**
Added a `linkify` parameter to `MessageFormatter` to optionally disable
link conversion

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

**Screenshots**

**Before**
<img width="1012" alt="image"
src="https://github.com/user-attachments/assets/70abb238-b4d9-439d-9e51-c7513cf482fb"
/>


**After**
<img width="1012" alt="image"
src="https://github.com/user-attachments/assets/387acb74-674e-4b26-85cc-2d7190d256b1"
/>




## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-01-23 18:18:14 +05:30
..
colorHelper.spec.js feat: Update public portal colors with new design (#8230) 2023-11-23 08:16:52 +05:30
CustomErrors.spec.js feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
CustomEventHelper.spec.js feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
DateHelper.spec.js fix: Retry message not working if the conversation has an external issue (#8529) 2023-12-13 15:46:10 +05:30
Emoji.spec.js fix: Avatar renders an incorrect symbol if it has emoji (#5184) 2022-08-03 14:11:33 +05:30
FileHelper.spec.js feat: Add ability to paste file/image from clipboard (#5627) 2022-10-25 13:35:11 +05:30
KeyboardHelpers.spec.js refactor: handling keyboard shortcuts (#9242) 2024-04-26 15:41:02 +05:30
localStorage.spec.js feat: Implement reply to for reply editor (#8063) 2023-10-10 19:13:12 +05:30
MessageFormatter.spec.js fix: Prevent template variables from becoming links (#10725) 2025-01-23 18:18:14 +05:30
MessageTypeHelper.spec.js Chore: View form responses as user messages (#876) 2020-05-17 22:49:45 +05:30
mitt.spec.js feat: Use vitest instead of jest, run all the specs anywhere in app/ folder in the CI (#9722) 2024-07-10 08:32:16 -07:00
ReportsDataHelper.spec.js feat: update tool-chain to latest (#7975) 2023-09-27 14:02:34 +05:30
sanitizeData.spec.js feat: multiple UX improvements to labels (#7358) 2023-06-25 18:49:49 +05:30
timeHelper.spec.js feat: Move timeMixin to a helper (#9799) 2024-07-22 13:07:29 +05:30
ValidatorsHelper.spec.js feat: Rewrite customAttributeMixin to validation helper (#9916) 2024-08-09 18:37:26 +05:30