Add regex to change error-causing XML character in a URL

This commit is contained in:
Alex Martzios 2021-10-25 12:40:55 +03:00
parent 0b85dfba03
commit 389cd74ba5
1 changed files with 11 additions and 1 deletions

View File

@ -241,8 +241,18 @@ export class ResultLandingService {
let url;
if(!Array.isArray(instance['webresource'])) {
url = instance['webresource'].url;
} else{
if(url.includes('&')) {
let regExp = /&/gmu;
let newUrl = url.replace(regExp, '&');
url = newUrl;
}
} else {
url = instance['webresource'][0].url;
if(url.includes('&')) {
let regExp = /&/gmu;
let newUrl = url.replace(regExp, '&');
url = newUrl;
}
}
/**********************************************************/