Skip to content

Commit

Permalink
Fix duplicate PathBase in OpengraphImageUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Dec 10, 2024
1 parent 348227e commit 3b694eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

Fix duplicate `PathBase` in OpengraphImageUrl in page template view.

## 2.2.0

Targets GOV.UK Frontend v5.2.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

var htmlLang = ViewBag.HtmlLang ?? "en";
var themeColor = ViewBag.ThemeColor ?? "#0b0c0c";
var ogImage = ViewBag.OpengraphImageUrl ?? $"{Context.Request.Scheme}://{Context.Request.Host}{Context.Request.PathBase}{assetPath}/images/govuk-opengraph-image.png";
var ogImage = ViewBag.OpengraphImageUrl ?? $"{Context.Request.Scheme}://{Context.Request.Host}{assetPath}/images/govuk-opengraph-image.png";
}
<!DOCTYPE html>
<html lang="@htmlLang" class="govuk-template @ViewBag.HtmlClasses">
Expand Down

0 comments on commit 3b694eb

Please sign in to comment.