{"data":{"id":"magento2-40870","source":"github-pr","sourceRef":"magento/magento2#40870","title":"Fixed: image attribute contains single quote","pr":{"number":40870,"url":"https://github.com/magento/magento2/pull/40870","author":"aasim110","mergedAt":"2026-07-28T12:06:30Z","mergeCommit":"0c816c1af944b8dff21844fd95fda237946cf341","headCommit":"ce4e0be9fc82d467b20661e9b65a5cff9fe2d51f","baseRef":"2.4-develop","diffSha256":"a1058b610b853cc2a163b84d73700e87aaa22fdc31a31c18fccacef2b4fe7814"},"issues":[{"number":40519,"url":"https://github.com/magento/magento2/issues/40519","title":"[Issue] Fix the product gallery tab when an image attribute label contains a single quote","labels":["Area: Content / CMS","Component: MediaGallery","Issue: Confirmed","Priority: P2","Progress: PR Created","Progress: done","Reported on 2.4.x","Reproduced on 2.4.x"],"kind":"pr-derived"}],"fixedIn":null,"containingTags":[],"reportedOn":null,"codeMatch":{"2.4.6":"conflict","2.4.6-p1":"conflict","2.4.6-p2":"conflict","2.4.6-p3":"conflict","2.4.6-p4":"conflict","2.4.6-p5":"conflict","2.4.6-p6":"conflict","2.4.6-p7":"conflict","2.4.6-p8":"conflict","2.4.6-p9":"conflict","2.4.6-p10":"conflict","2.4.6-p11":"conflict","2.4.6-p12":"conflict","2.4.6-p13":"conflict","2.4.6-p14":"conflict","2.4.6-p15":"conflict","2.4.7":"conflict","2.4.7-p1":"conflict","2.4.7-p2":"conflict","2.4.7-p3":"conflict","2.4.7-p4":"conflict","2.4.7-p5":"conflict","2.4.7-p6":"conflict","2.4.7-p7":"conflict","2.4.7-p8":"conflict","2.4.7-p9":"conflict","2.4.7-p10":"conflict","2.4.8":"conflict","2.4.8-p1":"conflict","2.4.8-p2":"conflict","2.4.8-p3":"conflict","2.4.8-p4":"conflict","2.4.8-p5":"conflict","2.4.9":"clean"},"affectedVersions":["2.4.9"],"components":["magento/module-product-video"],"files":[{"path":"app/code/Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml","change":"modified","package":"magento/module-product-video"}],"stripped":{"tests":[],"docs":[],"outsideCode":[]},"linesChanged":2,"mergeBatched":true,"excluded":null,"sections":{"description":null,"stepsToReproduce":"1. Create an image attribute with a label containing a single quote (e.g. Image d'exemple)\n2. Assign it to some attribute set\n3. Edit any corresponding product in the admin and open the gallery tab: the gallery is broken","expectedResult":null,"actualResult":null,"source":"pr"},"signatures":[],"labels":{"area":["Content / CMS"],"component":["MediaGallery"],"priority":"P2","severity":null,"reportedOn":["2.4.x"]},"categories":[],"triage":{"model":"@cf/cloudflare/clef","requestHash":"9d4fb3eef90994d4e66a853278e440e35fb09aa70da263f345ecd5e4b2365fd8","isBugfix":0.9803,"changeKind":{"choice":"bugfix","probabilities":{"bugfix":0.9691,"feature":0.0039,"refactor":0.0082,"tests_only":0.0037,"docs_only":0.0033,"dependency":0.0034,"cleanup":0.0084},"confidence":0.9294},"scope":{"score":0.1524,"probabilities":{"0":0.875,"1":0.0976,"2":0.0274},"confidence":0.6638},"risk":{"score":0.2654,"probabilities":{"0":0.754,"1":0.2266,"2":0.0194},"confidence":0.4303},"area":{"choice":"admin","probabilities":{"catalog":0.2455,"checkout":0.0054,"customer":0.0041,"admin":0.6559,"graphql_api":0.0038,"framework":0.01,"frontend":0.06,"other":0.0153},"confidence":0.4222},"securityRelevant":0.8379,"reportedVersion":{"choice":"unspecified","probabilities":{"2.4.0":0.0041,"2.4.0-p1":0.0041,"2.4.1":0.0042,"2.4.1-p1":0.0038,"2.4.2":0.0069,"2.4.2-p1":0.0056,"2.4.2-p2":0.0072,"2.4.3":0.0096,"2.4.3-p1":0.0104,"2.4.3-p2":0.0101,"2.4.3-p3":0.0063,"2.4.4":0.0113,"2.4.4-p1":0.0087,"2.4.4-p10":0.0068,"2.4.4-p11":0.0073,"2.4.4-p12":0.0063,"2.4.4-p13":0.0068,"2.4.4-p14":0.0081,"2.4.4-p15":0.0061,"2.4.4-p16":0.0072,"2.4.4-p17":0.0058,"2.4.4-p18":0.0054,"2.4.4-p2":0.0027,"2.4.4-p3":0.0031,"2.4.4-p4":0.0033,"2.4.4-p5":0.0036,"2.4.4-p6":0.0051,"2.4.4-p7":0.0042,"2.4.4-p8":0.0044,"2.4.4-p9":0.0044,"2.4.5":0.0131,"2.4.5-p1":0.0115,"2.4.5-p10":0.0079,"2.4.5-p11":0.0128,"2.4.5-p12":0.0108,"2.4.5-p13":0.0088,"2.4.5-p14":0.0086,"2.4.5-p15":0.0075,"2.4.5-p16":0.0083,"2.4.5-p17":0.0079,"2.4.5-p2":0.0034,"2.4.5-p3":0.005,"2.4.5-p4":0.0059,"2.4.5-p5":0.0053,"2.4.5-p6":0.0061,"2.4.5-p7":0.0062,"2.4.5-p8":0.0054,"2.4.5-p9":0.0049,"2.4.6":0.0391,"2.4.6-p1":0.0208,"2.4.6-p10":0.0105,"2.4.6-p11":0.0143,"2.4.6-p12":0.0127,"2.4.6-p13":0.0122,"2.4.6-p14":0.0133,"2.4.6-p15":0.009,"2.4.6-p2":0.0054,"2.4.6-p3":0.0085,"2.4.6-p4":0.0096,"2.4.6-p5":0.0082,"2.4.6-p6":0.0087,"2.4.6-p7":0.0109,"2.4.6-p8":0.0075,"2.4.6-p9":0.0069,"2.4.7":0.0236,"2.4.7-p1":0.0178,"2.4.7-p10":0.0109,"2.4.7-p2":0.0099,"2.4.7-p3":0.0122,"2.4.7-p4":0.0143,"2.4.7-p5":0.012,"2.4.7-p6":0.0152,"2.4.7-p7":0.013,"2.4.7-p8":0.0094,"2.4.7-p9":0.0073,"2.4.8":0.025,"2.4.8-p1":0.0183,"2.4.8-p2":0.0202,"2.4.8-p3":0.0202,"2.4.8-p4":0.0169,"2.4.8-p5":0.0147,"2.4.9":0.0203,"unspecified":0.1989},"confidence":0.0387},"backportWorthy":{"score":1.6742,"probabilities":{"0":0.0671,"1":0.1915,"2":0.7414},"confidence":0.3862}},"curated":{"title":"Fixes broken admin product gallery when an image attribute label has a quote","description":"The data-types attribute in the admin product gallery was delimited using single quotes with @noEscape. When an image attribute label contains a single quote, such as Image d'exemple, the attribute is cut off and the gallery breaks. The ProductVideo gallery.phtml template now uses escapeHtmlAttr() with double quotes.","categories":[],"author":"claude-code/opus-5.5","date":"2026-10-06","reviewedBy":null},"tests":null},"_documentation":"https://magento.watch/api","_description":"Upstream fix magento2-40870 details"}