Fixes escaping in tag clouds by sgiehl · Pull Request #9447 · matomo-org/matomo · GitHub
Skip to content
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

Fixes escaping in tag clouds #9447

Merged
merged 1 commit into from
Jan 11, 2016
Merged

Fixes escaping in tag clouds #9447

merged 1 commit into from
Jan 11, 2016

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 26, 2015

As it can be seen in the UI tests, the words in tag clouds might get displayed escaped:

image

With this changes it looks correct:

image

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review labels Dec 26, 2015
@sgiehl sgiehl added this to the 2.16.0 milestone Dec 26, 2015
@@ -1,7 +1,7 @@
{% set cloudColumn = properties.columns_to_display[1] %}
<div class="tagCloud">
{% for word,value in cloudValues %}
<span title="{{ value.word }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
<span title="{{ value.word|rawSafeDecoded }} ({{ value.value }} {{ properties.translations[cloudColumn]|default(cloudColumn) }})" class="word size{{ value.size }}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to call $word = Common::unsanitizeInputValue($word); as well? So far it seems only wordTruncated is handled or was $word already working?

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've added that for truncated word only, as otherwise the text might be cut off within a encoded char like  

tsteur added a commit that referenced this pull request Jan 11, 2016
@tsteur tsteur merged commit 0e58f26 into master Jan 11, 2016
@tsteur tsteur deleted the fix_tagcloud_escaping branch January 11, 2016 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants