does this make sense?
and besides just wondering what exactly is being stripped where?
I tried setting another image background and it seems the url to the pictures was continually being stripped out :-(
does this make sense?
and besides just wondering what exactly is being stripped where?
I tried setting another image background and it seems the url to the pictures was continually being stripped out :-(
Hi Ovidiu,
About enqueue-ing styles, that only works with external CSS files, so the plugin would have to generate static files to be loaded by wp_enqueue_style(). Since the CSS is being filtered and outputted in the <head> section, it's not possible to use the enqueue function.
Regarding things being stripped out: I don't think url() properties should be stripped out; only loading external CSS is supposed to be stripped out. Right now it's 11 p.m. where I am, so I'll have to examine this in detail when I wake up tomorrow.
Regards,
Frederick
no rush, but please check. I hat to edit the syle.css fiel directly because backgroud urls were stripped out. maybe its some other thing stripping them out, but basically the stuff I added via your plugin was beeing loaded, minus the urls for the background images :-(
Hello,
I've verified that the regular expression pattern used,
/@import.+;( |)|((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/i
indeed strips out ALL CSS that includes a URL — it's the last condition: (?:\/\/.*) . Originally I used this to prevent users from inserting external CSS that couldn't be controlled by a WordPress mu admin — for example, @import url(http://example.com/badstyles.css) or abusing background-image: url(http://photosite.com/notsafeforwork.jpg) .
Seeing this problem, I'm planning on loosening the restrictions in the regular expressions in the next minor version (0.4) to allow background image URLs.
Given the seriousness of this bug, as compared to the other aesthetic issue you mentioned in your other post, I'll be releasing 0.4 with the fixed regex pattern today.
Regards,
Frederick
cool, background urls are good, but please do not loosen anything else, I am using this plugin on wpmu, there shouldn't be any loopholes for users.
You must log in to post.