Repair: copy legacy joinDate into new user's created_at when creating users from legacy wallz
This commit is contained in:
@@ -97,12 +97,32 @@ function slugify(text) {
|
||||
}
|
||||
|
||||
function stripHtml(html) {
|
||||
const decodeEntities = (value) => {
|
||||
let decoded = String(value ?? '')
|
||||
|
||||
for (let index = 0; index < 4; index += 1) {
|
||||
if (!decoded.includes('&')) break
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.innerHTML = decoded
|
||||
const next = textarea.value
|
||||
if (next === decoded) break
|
||||
decoded = next
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return decoded
|
||||
}
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = html
|
||||
div.innerHTML = decodeEntities(html)
|
||||
return div.textContent || div.innerText || ''
|
||||
}
|
||||
return html.replace(/<[^>]*>/g, '')
|
||||
return decodeEntities(html).replace(/<[^>]*>/g, '')
|
||||
}
|
||||
|
||||
function formatDate(dateStr) {
|
||||
|
||||
Reference in New Issue
Block a user