mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
templates - don't clean up selector conditionals; fixes topic posting bug introduced at 090d35f306
This commit is contained in:
@@ -320,16 +320,16 @@
|
|||||||
if (conditionalBlock[1]) {
|
if (conditionalBlock[1]) {
|
||||||
// there is an else statement
|
// there is an else statement
|
||||||
if (!value) {
|
if (!value) {
|
||||||
template = template.replace(matches[i], conditionalBlock[1].replace(/<!-- ((\IF\b)|(\bENDIF\b))(.*?)-->/gi, ''));
|
template = template.replace(matches[i], conditionalBlock[1].replace(/<!-- ((\IF\b)|(\bENDIF\b))([^@]*?)-->/gi, ''));
|
||||||
} else {
|
} else {
|
||||||
template = template.replace(matches[i], conditionalBlock[0].replace(/<!-- ((\IF\b)|(\bENDIF\b))(.*?)-->/gi, ''));
|
template = template.replace(matches[i], conditionalBlock[0].replace(/<!-- ((\IF\b)|(\bENDIF\b))([^@]*?)-->/gi, ''));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// regular if statement
|
// regular if statement
|
||||||
if (!value) {
|
if (!value) {
|
||||||
template = template.replace(matches[i], '');
|
template = template.replace(matches[i], '');
|
||||||
} else {
|
} else {
|
||||||
template = template.replace(matches[i], matches[i].replace(/<!-- ((\IF\b)|(\bENDIF\b))(.*?)-->/gi, ''));
|
template = template.replace(matches[i], matches[i].replace(/<!-- ((\IF\b)|(\bENDIF\b))([^@]*?)-->/gi, ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user