Empty A Tag in Widget

I have the following code for a widget that we use across the site.

The rendered code inside of the Calendar seems to work fine. But when I run PageSpeed I get an empty a href on the site.

This is the page that renders the extra a tag: https://www.umkc.edu

<div class="calendar-date__container">
	<div class="calendar-date__date">
		<p>
			<svg xmlns="http://www.w3.org/2000/svg" class="calendar-date__icon" viewbox="0 -960 960 960"><path d="M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Z"/></svg>
			 {date}
		</p>
	</div>
	<div class="calendar-date__info">
		<p class="calendar-date__description"><a href="{online_url}">{title}</a></p>
		<p class="calendar-date__time">
			<svg xmlns="http://www.w3.org/2000/svg" class="calendar-date__icon" viewbox="0 -960 960 960"><path d="m612-292 56-56-148-148v-184h-80v216l172 172ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-400Zm0 320q133 0 226.5-93.5T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160Z"/></svg>
			 {time}
		</p>
		<p class="calendar-date__location">
			<svg xmlns="http://www.w3.org/2000/svg" class="calendar-date__icon" viewbox="0 -960 960 960"><path d="M480-480q33 0 56.5-23.5T560-560q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 33 23.5 56.5T480-480Zm0 294q122-112 181-203.5T720-552q0-109-69.5-178.5T480-800q-101 0-170.5 69.5T240-552q0 71 59 162.5T480-186Zm0 106Q319-217 239.5-334.5T160-552q0-150 96.5-239T480-880q127 0 223.5 89T800-552q0 100-79.5 217.5T480-80Zm0-480Z"/></svg>
			 {location}
		</p>
	</div>
</div>

It is because of this…

<a href="{online_url}">{title}</a>

{title} already contains a link, so you are putting a link inside a link, and the browser can’t do that.

You should use {title_clean}, which is just the text of the title, to avoid the extra link.

https://support.livewhale.com/live/blurbs/widget-formatting#clean

2 Likes