The Wikidata SMILES properties (canonican SMILES, isomeric SMILES, CXSMILES) values all have characters that need encoding before passed as $1 in the formatter URL (for 'canonical SMILES' it is https://www.simolecule.com/cdkdepict/depict/bow/svg?smi=$1&zoom=2.0&annotate=none). Currently this causes broken links out the CDK Depict. Now, I have seen (cannot remember which property) a similar problem where the statement value needs preprocessing before it links out. I like to set this up for the SMILES properties, but do not have entirely clear to how to start this effort (besides finding what property was doing something like what I think may be the solution).
A simpler alternative is that the 'formatter URL' approach allowed encoding the statement value before pass as $1.
Example CXSMILES where the simple 'formatter URL' does not work:
https://www.wikidata.org/wiki/Q46328873 statement value: CC([N+])C(=O)OC(CO)COP(=O)([O-])OCC(COC(=O)[*])OC(=O)[*] |$;;;;;;;;;;;;;;;;;;;;;_R1;;;;_R2$|
Example SMILES that does not work:
https://www.wikidata.org/wiki/Q133145 statement value: C#C problem: the # messes up the simple $1 URL formatter URL
BTW, another alternative is that the open source CDKDepict would just be part of the WMF portfolio stack and (CX)SMILES would be visualized inline. CDKDepict would take the SMILES statement value as input (properly encoded, of course) and returns SVG which could be embedded.