mirror of
https://github.com/pinry/pinry.git
synced 2025-11-13 16:45:41 +01:00
Update pinry tag handler and spinner
This commit is contained in:
@@ -14,9 +14,13 @@ function renderTemplate(templateId, context) {
|
||||
|
||||
|
||||
function cleanTags(tags) {
|
||||
if (typeof tags === 'string') {
|
||||
tags = tags.split(',');
|
||||
for (var i in tags) tags[i] = tags[i].trim();
|
||||
if (typeof tags === 'string' && tags.length > 0) {
|
||||
tags = tags.split(/[\s,]+/);
|
||||
for (var i in tags) {
|
||||
tags[i] = tags[i].trim();
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user