Skip to content

Commit

Permalink
Merge pull request #1121 from Ontotext-AD/GDB-9092-Toast-messages-not…
Browse files Browse the repository at this point in the history
…-handling-<-and>-symbols-when-stating-the-iri-is-invalid

GDB-9092 Toast messages not handling <> and symbols when stating the iri is invalid.
  • Loading branch information
MartinaDimova authored Nov 7, 2023
2 parents a0f140c + fa269d9 commit 8ae1f03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/js/angular/autocomplete/controllers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'angular/rest/autocomplete.rest.service';
import {mapNamespacesResponse} from "../rest/mappers/namespaces-mapper";
import {decodeHTML} from "../../../app";

const modules = [
'toastr',
Expand Down Expand Up @@ -82,7 +83,8 @@ function AutocompleteCtrl($scope, $interval, toastr, $repositories, $licenseServ
$scope.setLoader(false);
});
} else {
toastr.error($translate.instant('not.valid.iri', {value: labelIriText}));
const errorMessage = decodeHTML($translate.instant('not.valid.iri', {value: labelIriText}));
toastr.error(errorMessage);
$scope.setLoader(false);
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/js/angular/rdfrank/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'angular/utils/uri-utils';
import 'angular/rest/rdfrank.rest.service';
import 'ng-tags-input/build/ng-tags-input.min';
import {mapNamespacesResponse} from "../rest/mappers/namespaces-mapper";
import {decodeHTML} from "../../../app";

const rdfRankApp = angular.module('graphdb.framework.rdfrank', [
'ngRoute',
Expand Down Expand Up @@ -249,7 +250,8 @@ rdfRankApp.controller('RDFRankCtrl', ['$scope', '$interval', 'toastr', '$reposit
_addToList(list, iriText);
} else {
refreshFilteringConfig();
toastr.error($translate.instant('not.valid.iri', {value: iri.text}));
const errorMessage = decodeHTML($translate.instant('not.valid.iri', {value: iriText}));
toastr.error(errorMessage);
}
};

Expand Down

0 comments on commit 8ae1f03

Please sign in to comment.