Skip to content

Commit

Permalink
UIREQ-1080: Add support for Barcode tag with sanitize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy-Litvinenko committed Mar 27, 2024
1 parent 05a54a8 commit 7a25c46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ComponentToPrint/ComponentToPrint.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const rules = [
const parser = new Parser();

const ComponentToPrint = ({ dataSource, templateFn }) => {
const componentStr = sanitize(templateFn(dataSource));
const componentStr = sanitize(templateFn(dataSource), { ADD_TAGS: ['Barcode'] });
const Component = parser.parseWithInstructions(componentStr, () => true, rules) || null;

return Component;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/RequestsRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ class RequestsRoute extends React.Component {
const slipTypeInLowerCase = slipType.toLowerCase();
const slipTemplate = staffSlips.find(slip => slip.name.toLowerCase() === slipTypeInLowerCase);

return sanitize(get(slipTemplate, 'template', ''));
return sanitize(get(slipTemplate, 'template', ''), { ADD_TAGS: ['Barcode'] });
}

handleFilterChange = ({ name, values }) => {
Expand Down

0 comments on commit 7a25c46

Please sign in to comment.