Skip to content

Commit

Permalink
Remove javascript from href attributes, #1511
Browse files Browse the repository at this point in the history
  • Loading branch information
andergmartins committed Dec 15, 2023
1 parent 00c5e5d commit c06848d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion modules/calendar/lib/async-calendar/js/DayCell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function DayCell(props) {

return (
<a
href="javascript:void(0);"
className={className}
onClick={toggleUncollapseItems}><span className={'dashicons dashicons-' + iconClass}/> {label}</a>
);
Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/lib/async-calendar/js/Functions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function getPostLinksElement(linkData, handleOnClick) {
if (linkData.url) {
return (<a key={`link-${linkData.url}-${linkData.label}`} href={linkData.url}>{linkData.label}</a>);
} else if (linkData.action) {
return (<a key={`link-${linkData.url}-${linkData.label}`} href="javascript:void(0);" onClick={(e) => handleOnClick(e, linkData)}>{linkData.label}</a>);
return (<a key={`link-${linkData.url}-${linkData.label}`} onClick={(e) => handleOnClick(e, linkData)}>{linkData.label}</a>);
}
}

Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/lib/async-calendar/js/ItemPopup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default function ItemPopup(props) {
);
} else if (linkData.action) {
links.push(
<a key={`links-popup-${links.length}`} href="javascript:void(0);" onClick={(e) => handleOnClick(e, linkData)}>{linkData.label}</a>
<a key={`links-popup-${links.length}`} onClick={(e) => handleOnClick(e, linkData)}>{linkData.label}</a>
);
}

Expand Down
Loading

0 comments on commit c06848d

Please sign in to comment.