Skip to content

Commit

Permalink
Find and replace script tags only
Browse files Browse the repository at this point in the history
  • Loading branch information
vidya-ram committed Jun 26, 2024
1 parent 64dc1fe commit 8fb3450
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion funnel/assets/js/membership.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ const Membership = {
const data = await response.json();
if (data) {
const vueFormHtml = data.form;
this.memberForm = vueFormHtml.replace(/\bscript\b/g, 'script2');
this.memberForm = vueFormHtml.replace(/<\/?script/g, (tag) =>
tag === '<script' ? '<script2' : '</script2',
);
this.errorMsg = '';
$('#member-form').modal('show');
}
Expand Down

0 comments on commit 8fb3450

Please sign in to comment.