sprockets-rails icon indicating copy to clipboard operation
sprockets-rails copied to clipboard

In url() prevent relative path from being converted to root absolute path

Open Sega100500 opened this issue 3 years ago • 5 comments

Prevent non-digest (not assets pipeline) relative path from being converted to root absolute path. Prevent convert url() in attached third-party css-styles libraries.

Sega100500 avatar Jul 15 '22 07:07 Sega100500

@Sega100500 I'm using ckeditor gem and meet the same problem. This fix will solve the problem.

shuyahonda avatar Dec 02 '22 22:12 shuyahonda

@Sega100500 I'm using ckeditor gem and meet the same problem. This fix will solve the problem.

Same here.. what have you done while waiting for this fix?

huda-kh avatar Aug 16 '24 03:08 huda-kh

@huda-kh I suggested a very simple solution for fix this bug - just 2 lines of code. My fix failed the some tests and was successfully ignored. It is not difficult for me to manually fix the gem code after installation.

If Rails developers do not care about their product (and included to it gems) - they continue to ignore this bug.

Sega100500 avatar Aug 16 '24 10:08 Sega100500

This fixed it for me. https://github.com/galetahub/ckeditor/issues/919#issuecomment-1372890417

huda-kh avatar Aug 16 '24 11:08 huda-kh

@huda-kh Yes, agree - using config.assets.resolve_assets_in_css_urls is also very good solution. If it works correctly for you in all cases.

Sega100500 avatar Aug 16 '24 11:08 Sega100500