Skip to content

Commit

Permalink
Removing extra backslash from social block (#75)
Browse files Browse the repository at this point in the history
* Removing extra backslash from social block

* Review Comments change

* Review Comments change

---------

Co-authored-by: piyushjindal <[email protected]>
  • Loading branch information
jindaliiita and piyushjindal authored Sep 28, 2023
1 parent 0b374d0 commit c9cf2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blocks/social/social.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default async function decorate(block) {
const a = x.querySelector('a');
const span = document.createElement('span');
const newAnchor = document.createElement('a');
newAnchor.href = a.href;
newAnchor.href = a.href.replaceAll(/%5C%5C&/g, '&'); // Replacing extra backslash which is getting appended
const firstGrandChild = x.querySelector('div');
span.classList.add(`icon-${firstGrandChild.innerText.toLowerCase()}`, 'icon');
newAnchor.appendChild(span);
Expand Down

0 comments on commit c9cf2f3

Please sign in to comment.