weixin_39781452 2020-11-21 01:56
浏览 0

Auth_OpenID_Parse fails to find link attributes in HTML with uppercase HEAD tag

Offending HTML:




    <title>strk's publications</title>
        <link rel="stylesheet" href="style.css" type="text/css">




  <link rel="openid2.provider" href="https://id.xxx.io/">
  <link rel="openid2.local_id" href="https://strk.xxx.io/openid/">



The Auth_OpenID_Parse's parseLinkAttrs returns empty when passed that HTML. Why not using DOM rather than regexps in that function ?

该提问来源于开源项目:openid/php-openid

  • 写回答

9条回答 默认 最新

  • weixin_39781452 2020-11-21 01:56
    关注

    Lowercasing the <head> tags (open and closed) seems to fix the parsing, which is weird because the regexp used to parse ends with a /si flags

    评论

报告相同问题?