catching undefined errors on url
This commit is contained in:
parent
9a8ce332d7
commit
c5e7029c81
1 changed files with 23 additions and 20 deletions
|
@ -163,6 +163,7 @@ namespace htmltags {
|
|||
XBBCODE.addTags({
|
||||
function: {
|
||||
openTag: (params, content) => {
|
||||
if(params) {
|
||||
if(params.match(url_channel_regex)) {
|
||||
const groups = url_channel_regex.exec(params);
|
||||
|
||||
|
@ -181,14 +182,16 @@ namespace htmltags {
|
|||
client_name: decodeURIComponent(groups[3])
|
||||
});
|
||||
}
|
||||
}
|
||||
return origin_url.openTag(params, content);
|
||||
},
|
||||
closeTag: (params, content) => {
|
||||
if(params) {
|
||||
if(params.match(url_client_regex))
|
||||
return "</div>";
|
||||
if(params.match(url_channel_regex))
|
||||
return "</div>";
|
||||
|
||||
}
|
||||
return origin_url.closeTag(params, content);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue