Whoa, don't print a raw unescaped HTML code from guests in a guestbook.
This commit is contained in:
parent
c9cd434b59
commit
c42e604deb
@ -42,11 +42,9 @@ templ Guestbook(captchaID, owner string, entries []*justguestbook.Entry, pageCou
|
||||
</header>
|
||||
for _, line := range strings.Split(entry.Message, "\n") {
|
||||
if len(line) > 0 && line[0] == '>' {
|
||||
<p class="quote">@templ.Raw(line)
|
||||
</p>
|
||||
<p class="quote">{ line }</p>
|
||||
} else {
|
||||
<p>@templ.Raw(line)
|
||||
</p>
|
||||
<p>{ line }</p>
|
||||
}
|
||||
}
|
||||
if entry.Reply != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user