Browse Source

Fixed special characters not showing up on apges

master
Gisle Aune 7 years ago
parent
commit
4b814cedad
  1. 14
      model/page_test.go
  2. 3
      view/templates/base/default.tmpl

14
model/page_test.go

@ -1,6 +1,7 @@
package model
import (
"fmt"
"net/url"
"testing"
"time"
@ -29,7 +30,6 @@ var testPage = Page{
FictionalDate: fictionalDate,
PublishDate: postingDate,
EditDate: editDate,
Dated: true,
Published: true,
Unlisted: false,
Specific: false,
@ -262,6 +262,18 @@ func TestPage(t *testing.T) {
assertEquals(t, "page.Content()", string(content), "<h1>Returning Va’ynna’s Omni-Tool</h1>\n\n<p>Additional Content is additional</p>\n")
})
t.Run("ContentSpecial", func(t *testing.T) {
page := Page{Source: "Husarskie Anioły win the EUCC 2175", Type: "Markdown"}
content, err := page.Content()
if err != nil {
t.Errorf("page.Content: %s", err)
}
t.Log(string(content))
assertEquals(t, "page.Content()", string(content), fmt.Sprintf("<p>%s</p>\n", page.Source))
})
t.Run("WikiURL", func(t *testing.T) {
t.Skip("To be implemented")
})

3
view/templates/base/default.tmpl

@ -11,7 +11,8 @@
<meta name="theme-color" content="#222222">
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/ui/css/base.css" />
<link rel="stylesheet" href="/ui/css/magic.css" />
<link rel="stylesheet" href="/ui/css/theme.css" />

Loading…
Cancel
Save