a little bug in fileuploader_scripts.js

Hi ,



I am trying to upload image from URL and I’ve got invalid URL

Tried to track the problem and i found that a function return invalid URL:



function:

<br />
validate_url @ /js/fileuploader_scripts.js<br />
var regexp = /^[A-Za-z]+:\/\/[A-Za-z0-9-_:@\.]+[A-Za-z0-9-\+_%~&\\?\/.=]+$/;<br />

```<br />
and this regexp need to be fix to accept my image URL<br />
this is my image URL:<br />
```php
<br />
http://ia.media-imdb.com/images/M/MV5BMTQ1NDUyODk5NF5BMl5BanBnXkFtZTcwODk0MjIwNg@@._V1_.jpg<br />

```<br />
related function<br />
```php
<br />
show_loader: function(elm_id)<br />
	{<br />
		var suffix = elm_id.str_replace('_local_', '').str_replace('server_', '').str_replace('url_', '');<br />
<br />
		if (elm_id.indexOf('_local') != -1) {<br />
			this.display_filename(suffix, 'local', $('#' + elm_id).val());<br />
		}<br />
<br />
		if (elm_id.indexOf('server') != -1) {<br />
			fileuploader.init('box_server_upload', suffix);<br />
		}<br />
<br />
		if (elm_id.indexOf('url') != -1) {<br />
			var e_url = $('#message_' + suffix + ' span').html();<br />
			var n_url = '';<br />
<br />
			if (n_url = prompt($('#' + elm_id).html(), (e_url.indexOf('://') !== -1) ? e_url : '')) {<br />
				if (this.validate_url(n_url)) {<br />
					this.display_filename(suffix, 'url', n_url);<br />
				} else {<br />
					// My Temp Fix<br />
					this.display_filename(suffix, 'url', n_url);<br />
                                 	// End of My Temp Fix<br />
					alert(lang.text_invalid_url);<br />
				}<br />
			}<br />
		}<br />
	},<br />

```<br />
<br />
<br />
<br />
<br />
any help ?<img src="upload://yGrKuhdxbbf2nIFvV2XDJuEFQb7.gif" class="bbc_emoticon" alt=":)">

It's because of the “@”. Try this:


validate_url @ /js/fileuploader_scripts.js
var regexp = /^[A-Za-z]+:\/\/[A-Za-z0-9-_:@\.]+[A-Za-z0-9-@\+_%~&\\?\/.=]+$/;

[quote name=‘The Tool’ timestamp=‘1313580923’ post=‘119690’]

It’s because of the “@”. Try this:


validate_url @ /js/fileuploader_scripts.js<br />
var regexp = /^[A-Za-z]+:\/\/[A-Za-z0-9-_:@\.]+[A-Za-z0-9-@\+_%~&\\?\/.=]+$/;
```<br />
[/quote]<br />
<br />
<br />
<br />
yup , it works<br />
<br />
Thanks <img src="upload://yGrKuhdxbbf2nIFvV2XDJuEFQb7.gif" class="bbc_emoticon" alt=":)">