oblio
(oblio)
August 28, 2015, 9:56am
1
I’ve embedded Discourse on several Github Pages blogs. Something strange happens when the posts are shown on the forum, the emoji are huge: https://forum.oblio360.com/t/welcome-to-hearthstone-you-suck-hearthstone/15
Is this a bug? Or something I need to configure?
For reference normal, forum emoji are small, like they’re supposed to be: https://forum.oblio360.com/t/welcome-to-the-oblio-360-forum/8
(I’ve since deleted the topics but the bug is still present. The embedded emoji are shown 100%, as they are stored, while the forum ones seem to be shrinked)
1 Like
gwwar
September 8, 2015, 9:37pm
2
The huge emoji are missing the class="emoji"
attribute. How are the posts being imported? It’s likely being scrubbed by an attribute whitelist.
3 Likes
oblio
(oblio)
September 9, 2015, 12:00pm
3
embed whitelist selector: div.post
So I’m basically just importing the whole post, there are no other selectors applied.
gwwar
September 9, 2015, 9:14pm
4
@sam does it sound about right to add a whitelist selector for img.emoji
? I’m not as familiar with https://github.com/cantino/ruby-readability
1 Like
sam
(Sam Saffron)
September 9, 2015, 9:17pm
5
Sounds more or less right, been ages since I looked at that code.
2 Likes
oblio
(oblio)
September 10, 2015, 9:38pm
6
Is there anything I can do as an user? Should I add another whitelist selector?
Please, please, please, let it be a configuration option!
oblio
(oblio)
September 16, 2015, 1:24pm
7
I’ve added img.emoji in the whitelist:
div.post img.emoji
And I only got the huge emoji as the forum post
So this looks like a bug (albeit minor).
gwwar
September 22, 2015, 9:41pm
8
Too bad the whitelist didn’t work.
Could you add steps to show how you’re embedding the posts? It’ll help a lot in reproducing the issue.
oblio
(oblio)
September 22, 2015, 9:54pm
9
Plain old integration into Github Pages, using EvilTrout’s info . You can see the Github Pages repo here: https://github.com/oblio360/dota-blog/blob/gh-pages/_layouts/post.html
I’m just using bog-standard Githug Pages emoji, such as : smile :
gwwar
September 22, 2015, 10:26pm
10
For reference the Jekyll page is using the https://github.com/jekyll/jemoji plugin.
Original emoji markup looks like:
<img class="emoji" title=":worried:" alt=":worried:" src="https://assets.github.com/images/icons/emoji/unicode/1f61f.png" height="20" width="20" align="absmiddle">
1 Like
oblio
(oblio)
September 22, 2015, 11:10pm
11
I’m a bit unclear
Is this still a bug or did I just misconfigure something?
gwwar
September 22, 2015, 11:52pm
12
The huge emoji’s are the ones coming from assets.github.com (the jemoji gem). This is probably a minor bug with the crawler too aggressively scrubbing attributes from img tags.
Edit: After looking at the config settings, could you show me what you have in:
Is it just “div.post img.emoji” for the whitelist?
2 Likes
oblio
(oblio)
September 23, 2015, 6:43am
13
Now it’s just div.post.
When I tried div.post and img.emoji I got just the emoji.
BTW, the field doesn’t say which separator should be used. If it’s space or comma or whatever…
This is a good point, can we clarify the copy here @eviltrout so people are not confused, or show an example next to the field?
oblio
(oblio)
September 23, 2015, 8:29am
15
I think that the best thing would be to change it to the token-type entry. See for example: “Required” -> “exclude rel nofollow domains”.
If we’re at it, I propose another improvement for these kinds of field, they should tokenize on space and comma and other delimiters. This would make editing a lot more efficient. Right now you have to know that the separator is space and write everything and then Tab out, while the field separates the tokens. If it would just process the tokens during input, it would be a lot more user friendly, IMO. Write a word, space, token appears or write a word, comma, token appears.
Should I add this as a separate suggestion? (if you think it’s worth it)
eviltrout
(Robin Ward)
September 23, 2015, 4:12pm
16
I’ve added placeholder values to the fields with examples of CSS values.
@oblio it’s just a standard CSS selector so commas are the separators: article, .ad-unit
etc.
I don’t think it makes sense to add a token entry for this kind of thing – CSS works great for this!
1 Like
oblio
(oblio)
September 23, 2015, 5:00pm
17
Ah, ok, the placeholder values will probably do
gwwar
September 24, 2015, 10:55pm
18
5 Likes