-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use partials for search results #2387
base: main
Are you sure you want to change the base?
Conversation
.post-content= sanitize_written_content(reply.content.to_s, reply.editor_mode) | ||
.post-content | ||
- if params[:subj_content].present? | ||
= reply.pg_search_highlight.html_safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[brakeman] reported by reviewdog 🐶
Cross-Site Scripting Template Unescaped model attribute near line 63: (Unresolved Model).new.pg_search_highlight High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean you're not wrong that probably should be wrapped in sanitize_written_content or a version thereof, but also if that's a problem it already was
%td.padding-5{class: klass, style: 'width:15%'}= nickname | ||
%td.padding-5{class: klass, style: 'width:15%'}= breakable_text(screenname) | ||
%td.padding-5{class: klass, style: 'width:20%'}= pb | ||
- pb_width = show_cluster ? 'width:20%' : 'width:25%' | ||
%td.padding-5{class: klass, style: pb_width}= pb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InlineStyles: Do not use inline style attributes
%b= link_to reply.post.subject, reply_path(reply, anchor: "reply-#{reply.id}"), title: strip_tags(reply.post.description)&.html_safe | ||
.post-content | ||
- if params[:subj_content].present? | ||
= reply.pg_search_highlight.html_safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[brakeman] reported by reviewdog 🐶
Cross-Site Scripting Template Unescaped model attribute near line 40: (Unresolved Model).new.pg_search_highlight High
- if reply.is_a?(Reply) && reply.id.present? | ||
%a.noheight{id: "reply-#{reply.id}"}= " " | ||
- if reply == @unread | ||
.unread-marker-container | ||
%a#unread.unread-marker First unread marker | ||
.padding-10 | ||
%div{class: search_ui ? '' : 'padding-10', style: search_ui ? 'display: inline' : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InlineStyles: Do not use inline style attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I know i hate it too
Todo: Handle differing reply links in some way that isn't more horrifying branching code (content_for?)