regex tweak

main
Mike Fix 6 years ago
parent 9b885c6fd9
commit 7b20d8744a

@ -185,7 +185,7 @@ class Editor extends React.Component {
.replace(/ /g, ' ') .replace(/ /g, ' ')
// https://github.com/tsayen/dom-to-image/blob/fae625bce0970b3a039671ea7f338d05ecb3d0e8/src/dom-to-image.js#L551 // https://github.com/tsayen/dom-to-image/blob/fae625bce0970b3a039671ea7f338d05ecb3d0e8/src/dom-to-image.js#L551
.replace(/%23/g, '#') .replace(/%23/g, '#')
.replace(/%0A/, '\n') .replace(/%0A/g, '\n')
) )
// https://stackoverflow.com/questions/7604436/xmlparseentityref-no-name-warnings-while-loading-xml-into-a-php-file // https://stackoverflow.com/questions/7604436/xmlparseentityref-no-name-warnings-while-loading-xml-into-a-php-file
.then(dataUrl => dataUrl.replace(/&(?!#?[a-z0-9]+;)/g, '&')) .then(dataUrl => dataUrl.replace(/&(?!#?[a-z0-9]+;)/g, '&'))

Loading…
Cancel
Save