Skip to content

Conversation

rhamilto
Copy link
Member

@rhamilto rhamilto commented Nov 2, 2016

Additional fix for https://bugzilla.redhat.com/show_bug.cgi?id=1389658

Popover text exceeding 350 characters will get truncated in the middle. I arbitrarily chose 350. Should it be more/less?

screen shot 2016-11-02 at 11 47 17 am

@jwforres or @spadgett, PTAL

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small comment. LGTM otherwise.

<span ng-if="content">
<span
dynamic-content="{{content}}"
dynamic-content="{{content | middleEllipses:350:'...<br>...'}}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use HTML entity for the ellipsis?

dynamic-content="{{content | middleEllipses:350:'&hellip;<br>&hellip;'}}"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! Unfortunately, using the html entity caused the second ellipsis to take up its own line in the popover, so I settled for the less semantic three periods. :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fact that this works makes me worried that its possible for us to be injecting error messages with <> in them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, looks like its handling it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 6 below makes this possible, no? Bootstrap's popover documentation says,

Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, something else we are doing is sanitizing the error message already.

@spadgett
Copy link
Member

spadgett commented Nov 2, 2016

Built dist does not match what is committed, run 'grunt build' and include the results in your commit.

@rhamilto
Copy link
Member Author

rhamilto commented Nov 2, 2016

D'oh. I had an outdated Bower dependency. That's what I get for rushing to submit the PR before yoga. Is fixed now.

@jwforres
Copy link
Member

jwforres commented Nov 2, 2016

[merge]

@openshift-bot
Copy link

Evaluated for origin web console merge up to d0f58d4

@openshift-bot
Copy link

openshift-bot commented Nov 2, 2016

Origin Web Console Merge Results: SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_web_console/640/) (Base Commit: d7146b5)

@openshift-bot openshift-bot merged commit 7862d49 into openshift:master Nov 2, 2016
@rhamilto rhamilto deleted the bz-1389658 branch November 2, 2016 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants