Skip to content

Instantly share code, notes, and snippets.

@donjajo
Last active January 8, 2021 13:31
Show Gist options
  • Save donjajo/7266bdcb1dec79b091a55075736303fd to your computer and use it in GitHub Desktop.
Save donjajo/7266bdcb1dec79b091a55075736303fd to your computer and use it in GitHub Desktop.
Verify Unicode character on Google's page, to be used on this page - https://support.google.com/merchants/answer/7052112?hl=en
let table = document.getElementsByTagName("table")
tbodies = table[2].tBodies[0].children
for( let tr of tbodies ) { console.log( tr.children[0].textContent == tr.children[0].textContent.replace( /[^a-zA-Z0-9_-]/, "" ), `\nOriginal: ${tr.children[0].textContent}`, `\nSanitized: ${tr.children[0].textContent.replace( /[^a-zA-Z0-9_-]/, "" ) }`, `\nFound:`, tr.children[0].textContent.match(/[^A-Za-z0-9_-]/) ) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment