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>
|
</header>
|
||||||
for _, line := range strings.Split(entry.Message, "\n") {
|
for _, line := range strings.Split(entry.Message, "\n") {
|
||||||
if len(line) > 0 && line[0] == '>' {
|
if len(line) > 0 && line[0] == '>' {
|
||||||
<p class="quote">@templ.Raw(line)
|
<p class="quote">{ line }</p>
|
||||||
</p>
|
|
||||||
} else {
|
} else {
|
||||||
<p>@templ.Raw(line)
|
<p>{ line }</p>
|
||||||
</p>
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if entry.Reply != nil {
|
if entry.Reply != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user