File Coverage

blib/lib/HTML/Lint/Pluggable/HTML5.pm
Criterion Covered Total %
statement 28 31 90.3
branch 9 12 75.0
condition n/a
subroutine 10 10 100.0
pod 0 1 0.0
total 47 54 87.0


line stmt bran cond sub pod time code
1             package HTML::Lint::Pluggable::HTML5;
2 2     2   1052 use 5.008_001;
  2         8  
3 2     2   9 use strict;
  2         2  
  2         35  
4 2     2   7 use warnings;
  2         3  
  2         75  
5              
6             our $VERSION = '0.09';
7              
8 2     2   10 use parent qw/ HTML::Lint::Pluggable::WhiteList /;
  2         2  
  2         10  
9 2     2   1009 use List::MoreUtils qw/any/;
  2         20441  
  2         10  
10              
11             # refs. https://www.w3.org/TR/html5/syntax.html
12             my %html5_tag = map { $_ => 1 } qw/article aside audio bdi canvas command datalist details dialog embed figcaption figure footer header hgroup keygen main mark menu menuitem meter nav output progress section source summary template time track video rb rp rt rtc ruby wbr/;
13             my %html5_unclosed_tag = map { $_ => 1 } qw/area base basefont bgsound br col embed frame hr img input link meta param source track wbr/;
14              
15             my %html5_global_attr = map { $_ => 1 } qw/contenteditable contextmenu draggable dropzone hidden role spellcheck tabindex translate/;
16             my @html5_global_user_attr = (qr/^aria-/, qr/^data-/);
17             my %html5_attr = (
18             a => +{ map { $_ => 1 } qw/media/ },
19             area => +{ map { $_ => 1 } qw/media hreflang rel/ },
20             base => +{ map { $_ => 1 } qw/target/ },
21             meta => +{ map { $_ => 1 } qw/charset/ },
22             input => +{ map { $_ => 1 } qw/autofocus placeholder form required autocomplete min max multiple pattern step dirname formaction formenctype formmethod formnovalidate formtarget/ },
23             select => +{ map { $_ => 1 } qw/autofocus form required/ },
24             textarea => +{ map { $_ => 1 } qw/autofocus placeholder form required dirname maxlength wrap/ },
25             button => +{ map { $_ => 1 } qw/form autofocus formaction formenctype formmethod formnovalidate formtarget/ },
26             output => +{ map { $_ => 1 } qw/form/ },
27             label => +{ map { $_ => 1 } qw/form/ },
28             object => +{ map { $_ => 1 } qw/form/ },
29             fieldset => +{ map { $_ => 1 } qw/form disabled/ },
30             form => +{ map { $_ => 1 } qw/novalidate/ },
31             menu => +{ map { $_ => 1 } qw/type label/ },
32             style => +{ map { $_ => 1 } qw/scoped/ },
33             script => +{ map { $_ => 1 } qw/async/ },
34             html => +{ map { $_ => 1 } qw/manifest/ },
35             link => +{ map { $_ => 1 } qw/sizes/ },
36             ol => +{ map { $_ => 1 } qw/reversed/ },
37             iframe => +{ map { $_ => 1 } qw/sandbox seamless srcdoc allowfullscreen/ },
38             );
39              
40             # Generated by html5_entities.pl
41             my %html5_entity = map { "&" . $_ . ";" => 1 } qw/ lhard EmptySmallSquare capcup
42             odot dstrok solbar ulcorn Wcirc caret dscy nearrow zcy nrArr OpenCurlyQuote
43             twoheadrightarrow eogon imacr subsetneq boxUr angrt quatint xuplus mp Hfr
44             DoubleLeftArrow xcup GreaterLess orv Conint Racute isinv nsupE udhar boxvL
45             subsim VerticalLine infintie NotLeftTriangleBar NotVerticalBar vsubne ubrcy
46             ncup range doteq leftthreetimes lrarr supmult lessgtr profalar xrArr nge
47             gnsim gneq dotminus ubreve rmoust ltrPar SuchThat NotPrecedesEqual simlE
48             ulcorner sdotb DownArrowUpArrow marker Omacr Emacr NotLess Gbreve nLl les
49             tscy Ropf verbar gtquest gsim divonx Cedilla die tstrok DoubleVerticalBar
50             olt nleqslant Oopf Eopf LeftDownVector Lleftarrow YAcy Otimes LJcy nges
51             rightsquigarrow Superset lcaron rangd angrtvbd numsp questeq HilbertSpace
52             DiacriticalTilde Aogon angmsdaa gdot acd isindot cupdot nlE hoarr swarrow
53             NewLine dtrif ntrianglerighteq Xscr Rrightarrow LeftTriangleEqual sfr boxV
54             opar KJcy approx succapprox iopf Union bigtriangleup LeftDownTeeVector
55             lozenge emptyv gjcy harrw xodot LT smt fllig loang nang fcy LeftVector
56             bigstar Mscr submult vArr Bcy ltdot timesbar ucy nsube xrarr target
57             sqsubseteq supsim Ncy NotSuperset gvnE oscr nrarr frac15 integers gla kappav
58             thicksim DownRightTeeVector DoubleRightArrow Uogon Lacute GreaterTilde Tcy
59             smte supsetneq sfrown bsolhsub boxh succeq Dstrok xcirc nLt Lmidot realine
60             leftharpoonup vangrt cupcup daleth rbbrk NegativeThickSpace cularrp rbarr
61             wreath LongRightArrow beth gscr UpArrowDownArrow ngeq bigcap lbrack gne
62             gescc ngsim ContourIntegral ncaron niv GreaterGreater boxdL popf nGg Yscr
63             capdot Cayleys leftrightarrows iecy mcomma nsucceq Kopf OverBracket
64             triangledown elinters triangleq leg frac25 amalg rnmid lparlt langle prE Not
65             veeeq notinvc sqsupe cuesc lg rect cularr ohbar Gcy precnapprox trisb hstrok
66             gtlPar Lopf softcy flat DScy LessSlantEqual rightleftharpoons
67             twoheadleftarrow LowerLeftArrow simeq fscr dbkarow Uparrow ovbar
68             blacklozenge neArr boxminus eDDot quaternions hybull pertenk jfr lltri
69             backepsilon ii wcirc uscr napos wp CenterDot ShortRightArrow Nscr iff Breve
70             NotGreaterTilde checkmark nearhk angzarr rcaron Mcy boxVh hardcy Bscr utilde
71             boxUR shchcy Qfr Zcaron zdot mlcp NestedLessLess UnderBrace Tscr langd
72             precnsim gsime race ocy ee dharr Hat leqq smeparsl biguplus topf circledcirc
73             commat sstarf DoubleLeftRightArrow bigoplus blk12 eDot gtrless Vopf hslash
74             precsim Uarr lesseqgtr gcy prcue rhard strns gesles nvltrie eqcolon quest
75             COPY tshcy boxDL SquareSuperset osol subseteqq zeetrf orslope mldr rpargt
76             nsupseteqq boxuL nsce Ycy nsc swarhk NotHumpEqual measuredangle subedot
77             ReverseElement vartriangleright imof Gscr Vert rrarr Ufr RightAngleBracket
78             boxHu Implies CircleDot DJcy rationals napid plusacir blacktriangleright
79             ominus Product lmoust DoubleUpDownArrow par nless swArr cdot prnsim dopf
80             bigwedge hbar circleddash thickapprox eparsl planckh vltri gtcc lbarr Jfr ap
81             zscr parsim egs Gt eqcirc longrightarrow rbrack ycirc NotGreaterEqual jmath
82             Assign Lstrok hopf UpDownArrow mapsto Precedes rightharpoonup ecolon
83             Rightarrow precneqq horbar boxhd gl Ncedil angmsd NotLeftTriangle comp ac
84             Copf order mapstodown frac78 nltri UpArrow rangle Afr nearr plustwo bigvee
85             Tcedil Sacute grave NotPrecedesSlantEqual lessdot dwangle Poincareplane
86             Because tbrk ntriangleleft eplus NotTilde nvdash UpperLeftArrow lessapprox
87             Longleftarrow dollar nvrArr simrarr Gdot TSHcy Cacute efr Vbar Dopf khcy
88             nldr NegativeThinSpace notindot uring roang ape vellip ngt leq cscr
89             GreaterFullEqual dlcrop angrtvb swarr bumpE tridot Udblac supedot ccups
90             cuvee succ longmapsto Gcedil lnE gbreve sqsub NotLessSlantEqual trpezium
91             SubsetEqual supseteqq Fopf Sopf nsucc bigsqcup varpi sqsupset blacksquare
92             lbbrk DiacriticalDot demptyv sscr RightDownTeeVector setmn simplus ffllig
93             kopf mopf backsim Ecaron Xfr iocy bernou boxVR rharu twixt sccue gammad
94             lsquor SquareSubset ltimes Bumpeq Rcaron vprop prec npart blacktriangleleft
95             nshortmid sext VerticalBar GreaterEqual backcong boxplus bbrktbrk Wopf
96             EmptyVerySmallSquare lopf Vvdash xoplus LeftDownVectorBar gap nLtv
97             nleftarrow angle RightTeeVector olcir nbumpe lnapprox Ubrcy boxHd
98             LowerRightArrow uhblk NotGreaterLess csup supset ReverseEquilibrium
99             DifferentialD trie QUOT ReverseUpEquilibrium ecy NotRightTriangleBar xnis
100             FilledSmallSquare Ubreve scnsim OverParenthesis gimel ldquor LessLess nsmid
101             ShortLeftArrow rightleftarrows gesdoto eqslantgtr nparallel Map UnderBracket
102             geqslant lacute glj equest half ggg egsdot lmidot xlarr Rang Acy rarrw
103             ldrdhar rtrif seswar intcal xhArr block upuparrows nequiv angmsdae bemptyv
104             nhArr odblac cuepr circlearrowright leftrightharpoons lvertneqq Hscr GT lesg
105             rbrksld NotReverseElement NotTildeFullEqual nlarr varkappa bbrk nedot And
106             ddotseq ic YUcy odsold DoubleDot boxvl risingdotseq succneqq lneqq comma Jcy
107             squf LongLeftArrow divideontimes rightarrow bsemi vopf boxdl
108             DiacriticalAcute bnequiv scedil Succeeds topbot cirscir duarr Iopf subset
109             Ucy DoubleLongRightArrow UpperRightArrow cirfnint starf nopf laemptyv oint
110             RoundImplies mid reals Laplacetrf xopf Yfr uogon mnplus utri barwed mstpos
111             blk34 Cross succsim ccaps loplus nrightarrow roarr rbrke orderof xutri
112             curvearrowleft square af kgreen CircleTimes DotEqual NotExists Lcaron
113             NotSquareSupersetEqual gfr napE TildeTilde nsupseteq nacute colone
114             NotCongruent boxVH LeftCeiling nVdash ord nlArr robrk urcorn nharr ThinSpace
115             Popf succnsim notnivc LessTilde xwedge ijlig sigmav ratail sqcaps ufisht ofr
116             boxhu andslope rdca spar nvge vert ratio mumap Imacr el llarr Lang luruhar
117             SOFTcy looparrowright bopf Mfr HorizontalLine NotSucceedsSlantEqual bkarow
118             NotSquareSubsetEqual imagline Vdashl NotSubsetEqual xharr jcy thksim Abreve
119             urcorner simgE vsupnE ntgl propto xlArr RightUpTeeVector wopf RightArrowBar
120             asympeq cupor uHar uparrow nvHarr complexes subdot lE racute sol percnt
121             Colon backprime boxul lsimg boxH Utilde timesb Gfr drcrop uplus suplarr
122             boxVr boxDl NotEqualTilde succnapprox ltrif edot Uscr gel frac38
123             RightCeiling longleftarrow angmsdah rtriltri minusd supsetneqq Jukcy
124             imagpart phiv nsubset sharp lbrksld dotplus dcaron esim div Zacute
125             FilledVerySmallSquare Uarrocir RightTriangleEqual uharl topcir TRADE lharu
126             sqcups csupe leftharpoondown NotRightTriangleEqual nwnear Tab vrtri rsquor
127             rtimes suphsub yacy Tfr nrtri ropf therefore intlarhk Qscr
128             leftrightsquigarrow nmid xcap preceq HARDcy vnsub rightrightarrows ncap
129             angmsdad Nfr ForAll epar ufr diamond caps Longrightarrow gnap lesssim Zopf
130             UnionPlus Bfr compfn lstrok OpenCurlyDoubleQuote realpart DZcy supne
131             cupbrcap qopf NotSucceedsEqual awint ffr nvgt jscr rdquor tcaron Dcaron
132             iiint scy bowtie lobrk Ccirc bigtriangledown xdtri EqualTilde aopf awconint
133             downharpoonleft lesdot latail precapprox subsetneqq yopf ohm nsccue ange
134             ldca hcirc SquareSupersetEqual circledS cfr oS ell scE Gammad rlarr
135             straightphi ddarr dzcy jukcy cuwed emsp14 primes thetav
136             DoubleLongLeftRightArrow RightTee UpTee RightTeeArrow nLeftrightarrow hyphen
137             bNot xsqcup supdot UnderParenthesis triangleright escr DoubleContourIntegral
138             Uring Exists gtreqqless scpolint erDot NotElement sdote subne ddagger udblac
139             Ascr Diamond Ccaron Star hercon RightVector trianglelefteq ncongdot cups
140             raemptyv lrtri cire LessEqualGreater Scirc UpTeeArrow maltese ApplyFunction
141             amacr dzigrarr lates cir HumpEqual LeftUpDownVector roplus yucy caron odash
142             andand lbrke zfr loarr Jscr vzigzag female dtdot upharpoonright NotSubset
143             TildeFullEqual tritime gtcir Verbar nleqq tosa Sc Ll nesear Im triplus ltri
144             boxvH inodot bigodot frac23 RightUpDownVector lesseqqgtr mho tcedil ruluhar
145             IEcy lBarr NJcy ulcrop NotSquareSuperset lnap rtrie nvinfin npreceq cacute
146             ImaginaryI hscr male searhk ZHcy ltlarr zopf CapitalDifferentialD erarr
147             phmmat digamma Cscr between DoubleLeftTee sime tdot rbrkslu setminus boxdR
148             seArr tprime DownRightVector DownLeftVector bsolb rdsh NegativeVeryThinSpace
149             yfr nwArr Fscr DownBreve rarrfs Jcirc subsub afr nwarhk frac13
150             NotHumpDownHump LongLeftRightArrow ocir NonBreakingSpace Coproduct lrcorner
151             Sscr bumpeq ecaron elsdot icy NotLessEqual bumpe Dscr shcy Rcy lmoustache
152             frac58 Upsi vdash shortparallel GJcy CupCap ENG nsubseteqq Ecy emsp13 boxbox
153             Ocy angmsdac gE zacute InvisibleComma uwangle prnap rarrtl Supset barwedge
154             RightArrowLeftArrow SucceedsEqual nrarrw profsurf odiv cwconint copf
155             VerticalSeparator lfisht curlyvee nprcue lhblk OverBrace boxHU
156             CloseCurlyQuote triangle DiacriticalDoubleAcute ltcir rfr Topf naturals
157             Iogon SquareSubsetEqual gsiml Cdot searr Vscr PartialD CircleMinus
158             updownarrow tscr cwint vartheta ncong djcy aleph lAarr plusb heartsuit boxur
159             barvee notni rdldhar fopf qfr nGt GT ShortDownArrow fltns ExponentialE
160             PlusMinus boxDr Bopf ntlg Zfr midast SquareIntersection uopf boxVl
161             NotLeftTriangleEqual Nopf sqcup jcirc cirE epsi omid nisd LeftUpVectorBar
162             sqsup late umacr ntriangleright Subset leftarrowtail
163             ClockwiseContourIntegral Gopf nsup ast natur boxvR bnot dscr
164             NotGreaterFullEqual MinusPlus lagran Lcy rightharpoondown duhar smashp
165             Scedil efDot nleftrightarrow eqsim rcub nvap sqsubset REG Sum wfr
166             triangleleft qint Square gesdot Congruent bcong nsqsube Nacute uharr rHar
167             gtrarr siml nwarr eg supsub pcy lat DownLeftTeeVector Sqrt Pr solb Barwed
168             larrlp hookrightarrow cemptyv Kcy top expectation lesges napprox frac56
169             iukcy gtrdot ldsh sung DoubleUpArrow nprec drbkarow ssetmn scsim nesim
170             varnothing oopf bump gneqq vartriangleleft larrfs vsupne tcy subrarr
171             UpEquilibrium RuleDelayed filig gvertneqq Pfr succcurlyeq boxhD swnwar
172             varsupsetneqq mDDot Vcy prap models homtht plankv Proportion Leftrightarrow
173             midcir nsubE SquareUnion rmoustache sqcap iiota dot boxdr doublebarwedge
174             straightepsilon notinva andv HumpDownHump cupcap larrtl gEl DD isinE lesdoto
175             it subseteq searrow Mopf bfr Bernoullis epsiv wr rfisht gacute leqslant
176             varepsilon dsol ntrianglelefteq suphsol disin nwarrow bigcup mapstoup Edot
177             nfr emptyset notinE nLeftarrow curlyeqsucc zigrarr Ifr rtri NotSucceeds
178             congdot gnapprox jsercy fflig vfr LeftFloor PrecedesTilde dcy LeftUpVector
179             LeftRightVector rBarr Lscr gopf shortmid QUOT notnivb InvisibleTimes bottom
180             Rcedil Integral ltrie nshortparallel Esim lap fpartint NotTildeTilde
181             SucceedsSlantEqual varrho yicy urtri varr capbrcup plussim Kscr leftarrow
182             omacr pscr leftleftarrows nspar Yopf map Lsh IJlig lbrkslu xfr Mellintrf in
183             malt bepsi DownRightVectorBar DoubleRightTee supseteq IOcy capcap star
184             downdownarrows aogon otimesas nvDash srarr CloseCurlyDoubleQuote
185             NotSucceedsTilde incare Dot complement lcub numero rightarrowtail nsupe
186             NotGreaterGreater boxDR gesdotol sc AMP varphi SHCHcy period lHar frac35
187             sqsupseteq supdsub Lt utrif nltrie boxuR dotsquare lrhard scirc smile rarrlp
188             TScy sqsube andd dlcorn Wfr lfr Rsh Fcy rightthreetimes Scy Lcedil
189             varsubsetneq iscr nRightarrow DoubleDownArrow phone parsl itilde Xopf Jsercy
190             lowbar parallel Hcirc mfr kfr boxvr blacktriangledown rlhar topfork Oscr
191             rAarr Escr nap intercal DoubleLongLeftArrow Rscr Dcy vee scnE ngeqq nparsl
192             boxUL angmsdag sce Longleftrightarrow RightArrow Tstrok VDash conint Kcedil
193             hkswarow olarr lesdotor SmallCircle fjlig circeq NotPrecedes nGtv
194             MediumSpace gtrapprox Amacr circlearrowleft larrbfs nbump RightUpVectorBar
195             npolint olcross RightDoubleBracket nsupset vBarv angmsdaf mapstoleft Dfr
196             eopf curarrm COPY LeftArrowBar puncsp dashv mcy gtrsim rpar eng kcy rarrpl
197             angst simg LeftTee frac18 smallsetminus Sfr NotNestedGreaterGreater
198             LeftArrow Ffr yscr lcy utdot Sup Gg ccaron hamilt isinsv RightUpVector plus
199             rarrb lotimes origof ascr larrhk boxtimes nle Darr vDash ffilig ngeqslant
200             Cfr npre ogt prsim pm iinfin downarrow RBarr timesd lozf scap bigotimes
201             lbrace telrec Eogon hookleftarrow fork Vee hfr nvle Cup LeftAngleBracket
202             varsubsetneqq nles SucceedsTilde geqq LT Jopf lsime ThickSpace Zdot iogon
203             minusb ngE NotLessLess zcaron udarr emacr rthree iprod LeftVectorBar smid
204             lrhar PrecedesSlantEqual equivDD frown ccirc DownLeftVectorBar plusdo
205             supplus upsi check subnE cylcty squarf lAtail nvlArr vnsup lharul Or rcedil
206             blk14 angsph CirclePlus Aopf TildeEqual qprime csube npr profline dharl
207             bullet ZeroWidthSpace nrarrc plusdu Sub upharpoonleft AMP LeftRightArrow
208             LessFullEqual wedge hksearow Updownarrow Equilibrium VeryThinSpace
209             RightDownVector llcorner prurel planck varsigma DownTeeArrow varsupsetneq
210             rarrap gnE nis prnE tint oast NotSupersetEqual geq bsol NotLessGreater vcy
211             dblac dfr boxHD SupersetEqual wscr TripleDot bsime larrsim operp Dashv SHcy
212             Icy bot wedgeq Hstrok blacktriangle LeftArrowRightArrow Uopf rsqb pre ncy
213             boxv Zscr nlsim dHar Tcaron toea Umacr bcy nleq wedbar isins ssmile supnE
214             lEg jopf subplus nsime backsimeq urcrop rsh Equal apid Int qscr minusdu
215             RightVectorBar NoBreak NotLessTilde CHcy Gcirc Backslash ll Vfr cirmid
216             circledast Cap circledR veebar pr colon boxVL nVDash nsimeq Therefore lgE
217             tfr NotCupCap nexists Pcy OverBar ctdot LeftTriangle pointint
218             NotGreaterSlantEqual ltcc Ncaron Downarrow coprod rscr lopar preccurlyeq
219             Qopf nvrtrie subsup Kfr Larr NotDoubleVerticalBar curlyeqprec xscr drcorn
220             copysr apacir pfr UpArrowBar Hacek dfisht csub becaus triminus eqvparsl
221             DDotrahd RightTriangleBar notniva longleftrightarrow rbrace iiiint xotime
222             abreve NotNestedLessLess excl simne VerticalTilde lthree exponentiale Odblac
223             oror kcedil Colone imath Lfr RightTriangle rppolint spadesuit
224             RightDownVectorBar vscr rharul nscr orarr lsim lcedil pluscir ltquest Itilde
225             ges esdot rAtail trianglerighteq fallingdotseq boxhU cudarrr scnap Iscr
226             gtreqless pitchfork UnderBar lneq lnsim ldrushar notinvb NotTildeEqual
227             intprod ecir breve bne supE DownTee frac16 curlywedge cross Zcy bscr rarrbfs
228             DownArrow uuarr natural pluse curarr ccupssm GreaterEqualLess slarr
229             NestedGreaterGreater larrpl lpar Pscr dtri bigcirc Rarrtl LeftTriangleBar
230             NotRightTriangle Ycirc doteqdot rcy gcirc hairsp capand Element Intersection
231             harrcir rarrhk equals llhard DownArrowBar ring PrecedesEqual rotimes nexist
232             xvee larrb njcy nrtrie Re eqslantless nvsim apE curvearrowright ngtr
233             Fouriertrf els Cconint Efr Ofr varpropto looparrowleft Tilde glE Wedge YIcy
234             Leftarrow Idot gg GreaterSlantEqual acE smtes lsh Rfr KHcy LeftUpTeeVector
235             rx ifr DiacriticalGrave boxUl dd angmsdab sopf centerdot kscr nsqsupe mscr
236             forkv diamondsuit frac45 acy squ Rarr num Del chcy LeftDoubleBracket Barv
237             ycy ropar lescc lne DownLeftRightVector ncedil nsim ultri supsup Wscr lscr
238             bsim xmap vsubnE nhpar leftrightarrow coloneq ogon LeftTeeVector LessGreater
239             Proportional NotEqual NegativeMediumSpace NotSquareSubset
240             CounterClockwiseContourIntegral Hopf easter approxeq clubsuit boxvh DotDot
241             simdot nlt multimap imped Vdash gesl zhcy dash kjcy because lvnE rarrc blank
242             vBar Iukcy diam npar bprime rarrsim rhov gtdot ljcy thkap REG cudarrl sacute
243             subE LeftTeeArrow downharpoonright lurdshar nsubseteq NotGreater lsqb semi
244             RightFloor ShortUpArrow nvlt ofcir/;
245              
246             sub init {
247 6     6 0 16 my($class, $lint) = @_;
248             $class->SUPER::init($lint => +{
249             rule => +{
250             'elem-unknown' => sub {
251 5     5   9 my $param = shift;
252 5 50       18 return 1 if $html5_tag{$param->{tag}};
253 0         0 return 0;
254             },
255             'elem-unclosed' => sub {
256 2     2   3 my $param = shift;
257 2 50       7 return 1 if $html5_unclosed_tag{$param->{tag}};
258 0         0 return 0;
259             },
260             'attr-unknown' => sub {
261 12     12   14 my $param = shift;
262 12 100       31 return 1 if $html5_global_attr{$param->{attr}};
263 10 100       27 return 1 if $html5_attr{$param->{tag}}{$param->{attr}};
264 6 100       40 return 1 if any { $param->{attr} =~ $_ } @html5_global_user_attr;
  12         53  
265 4         16 return 0;
266             },
267             'text-unknown-entity' => sub {
268 1     1   1 my $param = shift;
269 1 50       5 return 1 if $html5_entity{$param->{entity}};
270 0           return 0;
271             },
272             }
273 6         65 });
274             }
275              
276             1;
277             __END__