badges/shields

DOMParser for dynamic xml badge spews log results in production

Open

#2658 aperta il 6 gen 2019

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (5423 fork)batch import
good first issueservice-badge

Metriche repository

Star
 (22.337 star)
Metriche merge PR
 (Merge medio 6g 3h) (71 PR mergiate in 30 g)

Descrizione

e.g.

@#[line:21,col:1]
[xmldom warning]        unclosed xml attribute
@#[line:22,col:1]
[xmldom warning]        unclosed xml attribute
@#[line:23,col:1]
[xmldom warning]        unclosed xml attribute
@#[line:24,col:1]
[xmldom error]  element parse error: Error: attribute value must after "="
@#[line:47,col:85]
[xmldom error]  element parse error: Error: invalid tagName:\
@#[line:47,col:232]
[xmldom warning]        unclosed xml attribute
@#[line:154,col:7]
[xmldom error]  entity not found: 
@#[line:212,col:143]
[xmldom error]  entity not found: 
@#[line:212,col:143]
[xmldom warning]        unclosed xml attribute
@#[line:299,col:31]
[xmldom warning]        attribute "selected" missed value!! "selected" instead!!
@#[line:342,col:14]
[xmldom error]  entity not found: 
@#[line:379,col:57]
[xmldom error]  entity not found: 

I imagine DOMParser is printing warnings by default. They have a way to provide our own error handler. Maybe we can use that to suppress these messages.

https://github.com/jindw/xmldom#api-reference

Guida contributor