Open IuliiaHerets opened 22 hours ago
Triggered auto assignment to @abekkala (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
On saving empty brackets everytime, different behavior is shown.
The first time we remove the text inside brackets, the img
tag doesn't have alt
attr, backend returns the img
tag with alt
, the text after the last /
character. The second time we do that, the backend doesn't return any Onyx data so the context inside brackets is empty as we handle it here.
We can update the default alt
for img
tag if it's empty to be consistent with BE behavior
const attrCache = this.getAttributeCache(extras).attrCache;
const extraAttrs = attrCache && attrCache[imgSource];
const source = Str.sanitizeURL(imgSource);
const defaultAlt = source.split('/').at(-1);
return `<img src="${Str.sanitizeURL(imgSource)}"${` alt="${this.escapeAttributeContent(imgAlt || defaultAlt)}"`} ${extraAttrs || ''}/>`;
Or if we want to display them as empty brackets we can return alt
as an empty string, and then the backend will not update the default alt for the image tag
const attrCache = this.getAttributeCache(extras).attrCache;
const extraAttrs = attrCache && attrCache[imgSource];
return `<img src="${Str.sanitizeURL(imgSource)}"${` alt="${this.escapeAttributeContent(imgAlt ?? "")}"`} ${extraAttrs || ''}/>`;
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: V9. 0.51-1 Reproducible in staging?: Y Reproducible in production?: Y Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
On saving empty brackets everytime, different behavior must not be shown.
Actual Result:
On saving empty brackets everytime, different behavior is shown.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/ff048afd-ec42-4c92-8a6f-a32b336be7c7
View all open jobs on GitHub