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

Announcements — For #2972 #2987

Merged
merged 3 commits into from
Jan 14, 2018
Merged

Announcements — For #2972 #2987

merged 3 commits into from
Jan 14, 2018

Conversation

WildcardSearch
Copy link
Contributor

announcements.php Twig conversion for #2972

Copy link
Member

@euantorano euantorano left a comment

Choose a reason for hiding this comment

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

Looks good, just a very minor comment.


{% block body %}

<table border="0" cellspacing="{{theme.borderwidth}}" cellpadding="{{theme.tablespace}}" class="tborder tfixed clear no_bottom_border">
Copy link
Member

Choose a reason for hiding this comment

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

Very small nitpick, but pesonally I like to have a space between the {{ and the variable name 😄

@WildcardSearch WildcardSearch changed the title For #2972 Announcements — For #2972 Jan 14, 2018
@WildcardSearch
Copy link
Contributor Author

Done @euantorano

@euantorano
Copy link
Member

One more small thing @WildcardSearch. This line uses htmlspecialchars_uni: https://github.com/WildcardSearch/mybb/blob/9cf50b02a6eb56a5cf02fde0357e6114e3c7ac4c/announcements.php#L99

This will lead to the subject being escaped twice and displaying weird characters (Twig automatically escapes). The best approach is to remove the htmlspecialchars_uni on that line.

@WildcardSearch
Copy link
Contributor Author

Done @euantorano

So going forward, remove all htmlspecialchars_uni(), correct?

@euantorano
Copy link
Member

@WildcardSearch Kind of. There are some cases where they may still be needed such as when passing user submitted content (usernames, posts, etc.) into a language variable that has HTML (some language variables have <br /> and such in them). In that case, you need to still use htmlspecialchars_uni as we have to output the language variable with |raw (which disable's Twig's escaping).

@euantorano euantorano merged commit e0d9afc into mybb:develop/1.9 Jan 14, 2018
euantorano pushed a commit that referenced this pull request Mar 16, 2018
* For #2972

* added whitespace

* remove htmlspecialchars_uni
euantorano pushed a commit to euantorano/mybb that referenced this pull request Mar 23, 2019
* For mybb#2972

* added whitespace

* remove htmlspecialchars_uni
euantorano pushed a commit to euantorano/mybb that referenced this pull request Mar 23, 2019
* For mybb#2972

* added whitespace

* remove htmlspecialchars_uni
euantorano pushed a commit that referenced this pull request Jun 2, 2019
* For #2972

* added whitespace

* remove htmlspecialchars_uni
euantorano pushed a commit that referenced this pull request Jun 2, 2019
* For #2972

* added whitespace

* remove htmlspecialchars_uni
@euantorano euantorano mentioned this pull request Jan 4, 2020
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.

None yet

2 participants