Skip to content

In debug mode, urls produces backslashes on windows #291

Open
@PaulUithol

Description

@PaulUithol

The change in 6fdcd87 (see #233) seems to cause query_url_mapping (and thus Bundle.urls) to produce urls containing backslashes on windows.

Example:

I'm calling urls on a bundle containing an item js/lib/jquery-2.0.3.js. The mapping points to /static/. This will call resolve_source_to_url with filepath=u'D:\\<project>\\static\\js/lib/jquery-2.0.3.js' and item=u'js/lib/jquery-2.0.3.js'. In query_url_mapping, this will cause the needle to be u'D:\\<project>\\static\\js\\lib\\jquery-2.0.3.js', which will cause it to return a url of u'/static/js\\lib\\jquery-2.0.3.js'.

Which will obviously lead to a 404 when attempting to load this url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions