1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Finished moving tag-manager from a vue to a component

Now tags load with the page, not via AJAX.
This commit is contained in:
Dan Brown
2020-06-29 22:11:03 +01:00
parent 4e107b9160
commit 573c4e26d5
21 changed files with 153 additions and 335 deletions

View File

@ -60,4 +60,14 @@ export function escapeHtml(unsafe) {
.replace(/>/g, ">")
.replace(/"/g, """)
.replace(/'/g, "'");
}
/**
* Generate a random unique ID.
*
* @returns {string}
*/
export function uniqueId() {
const S4 = () => (((1+Math.random())*0x10000)|0).toString(16).substring(1);
return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}