My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 79: The regular expressions in htmlTag parse some valid responses incorrectly
1 person starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by Gary.Bil...@gmail.com, Mar 12, 2014
I was trying to use openid with the communityId openid provider. This was failing because the 

preg_match_all("#<{$tag}[^>]*$valueName=['\"](.+?)['\"][^>]*$attrName=['\"].*?$attrValue.*?['\"][^>]*/?>#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.



Powered by Google Project Hosting