XSS fix, books only shows title with out color atm...
This commit is contained in:
@@ -8,9 +8,13 @@ class Comment {
|
||||
toString() {
|
||||
return this.name+': '+this.message
|
||||
}
|
||||
toHtml(user) {
|
||||
return '<p id="kommentar">'+this.name+': '+this.message
|
||||
+(user?' <a class="btn btn-primary" href="javascript: remove(\''+this.cfid+'\')">Slett</a>':'')+'</p>'
|
||||
toHtml(elm) {
|
||||
let user = firebase.auth().currentUser
|
||||
elm.append('<p class="kommentar"></p>')
|
||||
$($('.kommentar')[$('.kommentar').length-1]).text(this.toString())
|
||||
if (user) {
|
||||
$($('.kommentar')[$('.kommentar').length-1]).append(' <a class="btn btn-primary" href="javascript: remove(\''+this.cfid+'\')">Slett</a>')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user