lixxu / flask-paginate

Pagination support for flask
Other
281 stars 79 forks source link

quote url value of href attribute for bulma css #112

Closed D1CED closed 6 months ago

D1CED commented 7 months ago

The only case where the argument 0 is not quoted is in bulma (line three from below).

# previous link
_bs = '<li class="previous"><a href="{0}"{2}>{1}</a></li>'
_bs33 = '<li><a href="{0}" aria-label="Previous"{2}>\
<span aria-hidden="true">{1}</span></a></li>'
_bs4 = '<li class="page-item">\
<a class="page-link" href="{0}" aria-label="Previous"{2}>\
<span aria-hidden="true">{1}</span>\
<span class="sr-only">Previous</span></a></li>'
_bs5 = '<li class="page-item">\
<a class="page-link" href="{0}" aria-label="Previous"{2}>\
<span aria-hidden="true">{1}</span></a></li>'
_bulma = '<a class="pagination-previous" href={0} aria-label="Previous"{2}>{1}</a>'
_materialize = '<li class="waves-effect"><a href="{0}"{1}>\
<i class="material-icons">chevron_left</i></a></li>'

Is this intentional? I don't think leaving the value unquoted is wise here.

The effected lines are 36, 64 and 109 where url values are not quoted and they only appear in the context of bulma.

Cheers jmh.

lixxu commented 6 months ago

yes, it's a bug. New version fixed.

D1CED commented 6 months ago

Thanks for the quick fix.