Branching off of this issue.
dkruglyak, I am hesitant to add your addition to the module simply because I do think that Pathologic should be only an input filter. Part of this is for the sake of simplicity/laziness, but also because the number of people who use input filters (and should be using Pathologic) is much larger than the number of people who use CDN… and, again, I can't count myself among the latter number, so any development in that direction would be done in the dark. So I don't oppose your ideas at all, but I think they would work best as a separate module done by someone who does use CDN regularly.
To that direction, I'm definitely receptive to refactoring the code such that Pathologic's guts are more easily callable from outside - an API of sorts. Let me know what you think would be the best way to go about this; what do you think the function call should look like from your end?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | cdn_pathologic.patch | 947 bytes | dkruglyak |
Comments
Comment #1
dkruglyak commentedThanks for creating the issue. I completely refactored / shrunk my code to the format I believe could be acceptable "as is".
Instead of duplicating / rewriting your regex, I wrote a few lines of code to run your filter function on a dummy
<IMG>tag. This way there is no need to change any APIs or even configuration. Different format IDs can be specified via the function call and since this is a hook added by CDN module, it would work just fine without breaking anything else.This patch is tested and should be straightforward and simple enough to be committed.
Comment #2
Garrett Albright commentedYou're not listening to me, man. I'm not going to commit a patch I can neither test nor provide support for. Please build your own module for this functionality.
Comment #3
Garrett Albright commented