Skip to content

Commit

Permalink
BUGFIX: preview with no href in an <a>
Browse files Browse the repository at this point in the history
  • Loading branch information
makyen committed Jul 4, 2024
1 parent 3cdcb3e commit 4e3f58c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/post_preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ import { onLoad, route, addLocalSettingsPanel } from './util';
// https://chat.stackexchange.com/transcript/11540?m=54674140#54674140 (tags)
reportBody.find('a').each(function () {
const $this = $(this);
let href = $this.attr('href');
let href = $this.attr('href') || '';
if (!/^(?:[a-z]+:)?\/\//.test(href)) {
// It's not a fully qualified or protocol-relative link.
if (href.startsWith('/')) {
Expand Down

0 comments on commit 4e3f58c

Please sign in to comment.