
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
HTML style comment breaks script Β· Issue #4904 Β· jquery/jquery
Description:
Description $.append fails when I try to append script element with HTML style comment. There is no errors when I try to do the same thing using vanila JS: var script = document.createElement('...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Video & Online Content
- Social Networks
- Graphic Design
Content Management System {π}
What CMS is github.com built with?
Github.com is powered by WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,653,731 visitors per month in the current month.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 5,316,083 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,549.
The estimated annual recurring revenues (ARR) are $267,930,588.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
mgol, html, comments, script, comment, cdata, manipulation, remove, commented, scripts, dont, issue, member, jquery, style, sign, issues, pull, added, regex, var, replacement, line, rcleanscript, case, sections, htmlstyle, match, completely, skip, content, navigation, solutions, open, requests, actions, security, breaks, closed, description, append, element, errors, documentcreateelementscript, scripttext, javascript, domeval, jquerysrcmanipulationjs, aeb, test,
Topics {βοΈ}
io/ovarn/pen/vymgjzp single-line comment delimiters html style comment html style comment open browser console html-style comments mgol edits member prevent xss issues html comments issue f1fa169 mgol mentioned f15257e mgol mentioned clean html comments remove html comments jquery/src/manipulation execute inline scripts script contents wrapped generate script tags substantial solutions relevant test case script element textcontent x-stable branch append script element hitting issues match full lines comment var js comment mgol added /cdata-comment/2072/7 html comments comment return content regular scripts release jquery 3 js comments html documents script tags issues xml mode script tag x-stable type projects cdata sections [cdata[ console vanila js parse js full parser script support render contents cdata token cdata part
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:HTML style comment breaks script
articleBody:<!--
Feature Requests:
Please read https://github.com/jquery/jquery/wiki/Adding-new-features
Most features should start as plugins outside of jQuery.
Bug Reports:
Note that we only can fix bugs in the latest version of jQuery.
Briefly describe the issue you've encountered
* What do you expect to happen?
* What actually happens?
* Which browsers are affected?
Provide a *minimal* test case, see https://webkit.org/test-case-reduction/
Use the latest shipping version of jQuery in your test case!
We prefer test cases on JS Bin (https://jsbin.com/qawicop/edit?html,css,js,output) or CodePen (https://codepen.io/mgol/pen/wNWJbZ)
Frequently Reported Issues:
* Self-closing tags broken in jQuery 3.5.0 or newer: please read the [jQuery 3.5.0 blog post](https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/) & the [upgrade guide](https://jquery.com/upgrade-guide/3.5/); see also issue #4681.
-->
### Description ###
$.append fails when I try to append script element with HTML style comment.
There is no errors when I try to do the same thing using vanila JS:
```
var script = document.createElement('script');
script.text = '<!-- html style comment in javascript -->';
document.querySelector('html').append(script); // no errors
```
When I do it using jQuery:
```
var script = document.createElement('script');
script.text = '<!--html style comment in javascript -->';
$('html').append(script); // Uncaught SyntaxError: Unexpected identifier
```
The root cause:
The _domManip_ function does RegExp replacement before calling _DOMEval_ and removes _<!--_ and _-->_:
https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/manipulation.js#L30
https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/manipulation.js#L164
### Link to test case ###
https://codepen.io/ovarn/pen/vYmgjzP (open browser console to see the error)
author:
url:https://github.com/ovarn
type:Person
name:ovarn
datePublished:2021-07-14T09:07:05.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:11
url:https://github.com/4904/jquery/issues/4904
context:https://schema.org
headline:HTML style comment breaks script
articleBody:<!--
Feature Requests:
Please read https://github.com/jquery/jquery/wiki/Adding-new-features
Most features should start as plugins outside of jQuery.
Bug Reports:
Note that we only can fix bugs in the latest version of jQuery.
Briefly describe the issue you've encountered
* What do you expect to happen?
* What actually happens?
* Which browsers are affected?
Provide a *minimal* test case, see https://webkit.org/test-case-reduction/
Use the latest shipping version of jQuery in your test case!
We prefer test cases on JS Bin (https://jsbin.com/qawicop/edit?html,css,js,output) or CodePen (https://codepen.io/mgol/pen/wNWJbZ)
Frequently Reported Issues:
* Self-closing tags broken in jQuery 3.5.0 or newer: please read the [jQuery 3.5.0 blog post](https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/) & the [upgrade guide](https://jquery.com/upgrade-guide/3.5/); see also issue #4681.
-->
### Description ###
$.append fails when I try to append script element with HTML style comment.
There is no errors when I try to do the same thing using vanila JS:
```
var script = document.createElement('script');
script.text = '<!-- html style comment in javascript -->';
document.querySelector('html').append(script); // no errors
```
When I do it using jQuery:
```
var script = document.createElement('script');
script.text = '<!--html style comment in javascript -->';
$('html').append(script); // Uncaught SyntaxError: Unexpected identifier
```
The root cause:
The _domManip_ function does RegExp replacement before calling _DOMEval_ and removes _<!--_ and _-->_:
https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/manipulation.js#L30
https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/manipulation.js#L164
### Link to test case ###
https://codepen.io/ovarn/pen/vYmgjzP (open browser console to see the error)
author:
url:https://github.com/ovarn
type:Person
name:ovarn
datePublished:2021-07-14T09:07:05.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:11
url:https://github.com/4904/jquery/issues/4904
Person:
url:https://github.com/ovarn
name:ovarn
url:https://github.com/ovarn
name:ovarn
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:11
interactionType:https://schema.org/CommentAction
userInteractionCount:11
External Links {π}(6)
- https://github.blog's financial summary
- Discover the revenue of https://codepen.io/ovarn/pen/vYmgjzP
- What's the total monthly financial gain of https://kangax.github.io/compat-table/es6/?
- https://jquery.com/upgrade-guide/3.5/ income
- Revenue of https://www.sitepoint.com/community/t/cdata-comment/2072/7
- How much does https://www.githubstatus.com/ bring in each month?
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- jQuery
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net