-
Notifications
You must be signed in to change notification settings - Fork 356
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
Fixed invalid HTML markup in drift fonticons #2995
Conversation
Checked commit skateman@47669cd with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@@ -1223,7 +1223,7 @@ def drift_add_diff_image(idx, val) | |||
|
|||
def drift_add_image_col(idx, img_src, img_bkg, val) | |||
html = ViewHelper.content_tag(:div, :class => img_bkg) do | |||
ViewHelper.tag(:i, :class => img_src, :title => val) | |||
ViewHelper.content_tag(:i, nil, :class => img_src, :title => val) |
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.
@skateman does it make sense to add a test here?
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.
@ohadlevy well, not really. The code is ancient and IMHO it shouldn't even exist. Also the issue is not happening always and it's browser-dependent.
@skateman Tested. Looks good. |
Fixed invalid HTML markup in drift fonticons (cherry picked from commit 46531e5) https://bugzilla.redhat.com/show_bug.cgi?id=1524711
Gaprindashvili backport details:
|
Fixed invalid HTML markup in drift fonticons (cherry picked from commit 46531e5) https://bugzilla.redhat.com/show_bug.cgi?id=1525563
Fine backport details:
|
The
tag
helper method in Rails is a little bit inconsistent when it's about self-closing tags. It works well with aninput
field, but it fails to work with ani
tag that we're using for fonticons. This causes random duplication of tags when displaying a drift history of a host. Forcing the tag to be closed by using an emptycontent_tag
instead solves the issue.Before:
After:
https://bugzilla.redhat.com/show_bug.cgi?id=1466402
@miq-bot add_label bug, gaprindashvili/yes
@miq-bot assign @epwinchell