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

Str(value).match(R._ISURL) returns null for valid url #768

Open
awbergs opened this issue Aug 14, 2013 · 0 comments
Open

Str(value).match(R._ISURL) returns null for valid url #768

awbergs opened this issue Aug 14, 2013 · 0 comments

Comments

@awbergs
Copy link

awbergs commented Aug 14, 2013

My URL

"url('//local.com/service.svc/method?text=number%20(18)&bg=FFFFFF')"

Regex L170

/^url\(['"]?([^\]+?)['"]?\)$/i

This fails the regex match (svg L473 vml L250) because of the closing parenthesis in the url (number%20(18)). I'm assuming this portion ([^\)]+?) is there to make sure the last character is a closing parenthesis, but I believe that might not be necessary.

Having parenthesis in a URL is valid and should be allowed.

I would propose updating the regex to be something like the following:

/^url\(['"]?(.+?)['"]?\)$/i

tomasAlabes added a commit that referenced this issue Jan 19, 2015
* heads/v2.1.2:
  setViewBox() does not work properly for papers, having size in percents
  getBBox() works incorrect for VML after settings View Box on canvas
  IE 11 parentElement fix
  fix the error/memleak in Firefox 3.0.x and 25.0.1 concerning the getBBox method
  Several Fixes
  Added couple of fixes, and unused jshintrc
  Fix SVG insertBefore/insertAfter when using <a> wrapper node.
  Use dev folder for 'npm install' in the Quickstart.
  By @Badunk Setting aspect ratio to xMidYMid meet
  Merging TheCloudlessSky-prevent-multiple-svg-title
  IE8 / R2.0.1 - viewbox scaling
  Removing extra code in html
  href parameter for Paper.text does NOT behave like hyperlink in 2.1.2
  Change the version in bower.json to match the tag name.
  Final fix for #629
  Fix bug with arrow-end/start markers sharing properties. By @vkaravir
  AddEvent function incorrectly removes touch event listener. By @ThijsVanDerMeer
  IE8: getBBox returns orginal coordinates for a path after drag and setting new path. By @wyatte
  Issue #768 - Str(value).match(R._ISURL) returns null for valid url

Conflicts:
	dev/raphael.svg.js
	raphael-min.js
@tomasAlabes tomasAlabes removed this from the v.2.1.2 milestone May 25, 2016
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

2 participants