mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-24 00:06:25 +00:00
Support Firefox for PortableInfoboxBuilder (#83)
This commit is contained in:
parent
aa6eec615f
commit
6ea00e62e6
|
@ -227,9 +227,16 @@
|
|||
|
||||
if ( this.xsltProcessor ) {
|
||||
let transformed = this.xsltProcessor.transformToDocument( markup );
|
||||
|
||||
if ( transformed ) {
|
||||
return this.xmlSerializer.serializeToString( transformed )
|
||||
let result = this.xmlSerializer.serializeToString( transformed )
|
||||
.replace( /(?<=^ *) /mg, '\t' );
|
||||
|
||||
if ( result.indexOf( '<transformiix:result' ) > -1 ) {
|
||||
return '<infobox>' + result.substring( result.indexOf( '>' ) + 1, result.lastIndexOf( '<' ) ) + '</infobox>';
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue