Skip to content

html5shiv Vulnerability. #202

@prakash-patel

Description

@prakash-patel

I use sonarQube for code analysis and it's gave me vulnerability for for html5shiv.js and html5shiv-printshiv.js file.

image

I updated code as below. Am i missing anything in below function.

ownerDocument.createDocumentFragment = function(h,f){
    return function(){ 
      var n=f.cloneNode(),c=n.createElement;
      h.shivMethods&&(
        // unroll the `createElement` calls
        getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
          data.createElem(nodeName);
          data.frag.createElement(nodeName);
          return c("' + nodeName + '");
        }) 
      );
      return n;
    };
    }(html5, data.frag); 
  }

If you think this need to be change. I can create a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions