Needs work
Project:
Colorbox
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Oct 2022 at 13:44 UTC
Updated:
17 Oct 2025 at 08:43 UTC
Jump to comment: Most recent
Comments
Comment #2
paulmckibbenAfter installing DOMPurify using drush, even with the capitalization difference in the library path, the DOMPurify library was recognized, and HTML captions still displayed. There appears to be no issue with DOMPurify.
Comment #3
paulmckibbenGoing to reopen this to make sure DOMPurify is added to the test suite.
Comment #4
vfontaine commentedOn a fresh install of Drupal 9.4.8 including the colorbox module, the DOMPurify library was not recognized.
It was installed at the following location :
/libraries/DOMPurify/dist/purify.min.js
Renaming to :
/libraries/dompurify/dist/purify.min.js
solved the problem.
Comment #5
cindyr commentedI just installed it on Drupal 9.4.8 and had the same issue. Renaming the folder as mentioned in #4 solved the problem.
Comment #6
donaldp commentedSame issue and resolution for me as #4.
Comment #7
bataboza commentedSolution from #4 works for me too on Drupal 9.4.8. And this is the case when Drupal is installed manually and Colorbox by Composer. Then the path sould be /libraries/dompurify/dist/purify.min.js
Otherwise, in case when Drupal is installed by Composer, as well as Colorbox, then the path should be /libraries/DOMPurify/dist/purify.min.js
Comment #8
portulacaI have Drupal and Colorbox installed through Composer, only DOMPurify is manually copied into libraries/ folder, and renaming the folder to
dompurifymade the warning disappear.Comment #9
bart lambert commentedsame here like #4
Comment #10
pumpkinkid2 commentedI'll throw my hat in the "#4 helped me also" ring.
Comment #11
flyke commentedSame, only recognized if the folder is renamed
from: libraries/DOMPurify
to: libraries/dompurify
Comment #12
thomaswalther commented#4 worked for me (Drupal 10.2.1)
Comment #13
chike#4 worked for me (Drupal 10.2.0)
Comment #14
sproets commentedOn Drupal 11+ decapitalize the name tot dompurify still works, thanks!
Comment #15
karimbou commentedI had the issue for a long time, until checking the readme of colorbox, we basically need to enable dompurify with this command :
drush colorbox:dompurify
Then the warning and error to the path goes away.
But unlikely no configurations to be exported on this if you need to deploy to other environments, if you have a workaround to make it enabled easily ?