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

Invalid detection of JS baseUrl #3193

Closed
applibs opened this issue Jul 20, 2020 · 1 comment
Closed

Invalid detection of JS baseUrl #3193

applibs opened this issue Jul 20, 2020 · 1 comment
Assignees

Comments

@applibs
Copy link

applibs commented Jul 20, 2020

I checked this function:

$('head > script').each(function() {
	if(this.src && this.src.match(/js\/elfinder(?:-[a-z0-9_-]+)?\.(?:min|full)\.js$/i)) {
		myTag = $(this);
		return false;
	}
});

There are 2 problems:

  1. when all my scripts are in body then its not detected and it will generate wrong relative baseUrl later. Please enhance jQuery selector to: "head > script, body > script"
  2. When my elfinder url is managed by query vesion like this: "./elfinder/js/elfinder.full.js?version=5631" or anything else then regex will ignore it. Please enhance regex which will accept different url and not only stricted format.

Then theme.css for example is not loaded, because loading from wrong url.

@nao-pon nao-pon self-assigned this Sep 10, 2020
@nao-pon
Copy link
Member

nao-pon commented Nov 29, 2020

@applibs I chose not to search inside the because it could affect performance.
Please consider using the client option baseUrl.

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

No branches or pull requests

2 participants