Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with joining mutliple JS files due to URL generated by Helper #35

Closed
oscar-b opened this issue Feb 7, 2011 · 5 comments
Closed

Comments

@oscar-b
Copy link

oscar-b commented Feb 7, 2011

It seems that commit 81aa014 broke asset generation, at least on my configuration. (I can't find any test cases that test the actual content of the files being built from the urls generated from the Helper, so I couldn't re-create it that way.)

But, if I add some debug to js_files_controller.php in function get(), I can see that $this->params is wrong:

[url] => Array
    (
        [ext] => html
        [file] => Array
            (
                [0] => jquery-1.4.2.min
            )

        [amp;file] => Array
            (
                [0] => jquery.google-analytics

Obviously, it doesn't pick up the second file. If I change the path from using
&
to just
&
it works as it should.

@markstory
Copy link
Owner

Not really sure what the issue is here. Without the & the helper would be generating invalid HTML. The & should not be sent by the browser as it should convert the entity back to normal &.

@oscar-b
Copy link
Author

oscar-b commented Feb 8, 2011

Interesting, I guess I found a bug in Google Chrome (9.0.597.84 Linux).

If you click the URL from "view-source:domain.tld" it doesn't handle the & escaping properly. If you do it from the web inspector tool, it fetches the resource by the correct URL.

Strange, but feel free to close :)

@josegonzalez
Copy link
Contributor

I'm on Google Chrome 11.0.696.3 dev, OSX. This issue still exists, and I am preparing a patch to deal with it, since I do not believe it will be going away any time soon, and the majority of my users are on Chrome versions affected by it.

@josegonzalez
Copy link
Contributor

The following commit contains the changes that will "properly" fix this issue. josegonzalez/asset_compress@87ed164

There should also be a bug report on Chromium, but thats a separate issue.

@markstory
Copy link
Owner

Is there a place I could see this error in action? I tried locally using Chrome 10.0.648.133 on OSX and files downloaded fine when there were &'s in the urls.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants