Posted by Aaron Hawkins on April 19, 2008 at 7:15am
Jump to:
| Project: | Chili highlighter |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Line 13 "'". url($path) ."/';" picks up the language code from the url on multilingual sites. A better way to achieve the same result without picking up the language is the following alteration:
"'".check_url($base_path).$path."/';"
Comments
#1
The correct way to generate URLs in a Drupal module is to use the function
url(), which generates a correct URL for any server, and platform supported by Drupal.check_url()doesn't generate a URL; it prepares a URL for use in an HTML attribute, and strips harmful protocols.#2
This is actually a duplicate of #191026: Error when not using clean URLs.