File tree 3 files changed +41
-0
lines changed
3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < script type ="application/ld+json ">
6
+
7
+ {
8
+ "@context" : "http://schema.org" ,
9
+ "@type" : "NewsArticle" ,
10
+ "thumbnailUrl" : "https://uc.udn.com.tw/photo/2019/11/11/99/7053890.jpg" ,
11
+ "keywords" : "" ,
12
+ "url" : "https://money.udn.com/money/story/5635/4158094" ,
13
+ "mainEntityOfPage" : "https://money.udn.com/money/story/5635/4158094" ,
14
+ "headline" : "讓AI挑出感興趣 SparkAmplify精準行銷當紅" ,
15
+ "articleSection" : "商情" , // category
16
+ //"interactionCount": ""
17
+ }
18
+
19
+ </ script >
20
+ </ head >
21
+
22
+ < body > </ body >
23
+
24
+ </ html >
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "@context" : "http://schema.org" ,
4
+ "@type" : "NewsArticle" ,
5
+ "thumbnailUrl" : "https://uc.udn.com.tw/photo/2019/11/11/99/7053890.jpg" ,
6
+ "keywords" : "" ,
7
+ "url" : "https://money.udn.com/money/story/5635/4158094" ,
8
+ "mainEntityOfPage" : "https://money.udn.com/money/story/5635/4158094" ,
9
+ "headline" : "讓AI挑出感興趣 SparkAmplify精準行銷當紅" ,
10
+ "articleSection" : "商情"
11
+ }
12
+ ]
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ def test_jsonld_with_control_characters_comment(self):
40
40
self .assertJsonLdCorrect (
41
41
folder = 'custom.invalid' ,
42
42
page = 'JSONLD_with_control_characters_comment' )
43
+
44
+ def test_jsonld_with_json_including_js_comment (self ):
45
+ self .assertJsonLdCorrect (
46
+ folder = 'custom.invalid' ,
47
+ page = 'JSONLD_with_JS_comment' )
43
48
44
49
def assertJsonLdCorrect (self , folder , page ):
45
50
body , expected = self ._get_body_expected (folder , page )
You can’t perform that action at this time.
0 commit comments