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

The regular expressions in htmlTag parse some valid responses incorrectly #79

Open
GoogleCodeExporter opened this issue Jul 6, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I was trying to use openid with the communityId openid provider. This was 
failing because the 

preg_match_all("#<{$tag}[^>]*$valueName=['\"](.+?)['\"][^>]*$attrName=['\"].*?$a
ttrValue.*?['\"][^>]*/?>#i", $content, $matches2);

on line 391 parses the following incorrectly:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta 
http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Community ID</title> <link rel="shortcut icon" href="

/communityid/favicon.ico" />
<link rel="stylesheet" type="text/css" 
href="/communityid/javascript/yui/assets/skins/sam/skin.css" />
<link rel="stylesheet" type="text/css" 
href="/communityid/javascript/yui/reset-fonts-grids/reset-fonts-grids.css" />
<link rel="stylesheet" href="/communityid/styles/style.css?v=1.0.0_RC2" 
type="text/css" media="screen" charset="utf-8"/><link href="

http://uk2.greenwheel.com/communityid/openid/provider" rel="openid.server" />
<link href="http://uk2.greenwheel.com/communityid/openid/provider" 
rel="openid2.provider" />

It matches the entire section from /community.....to href="

I was able to fix this by changing the (.*?) to ([^>]*?) but this may not be 
the best fix.


Original issue reported on code.google.com by [email protected] on 12 Mar 2014 at 3:05

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

1 participant