oblio
(oblio)
28 Agosto, 2015 09:56
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 me gusta
gwwar
8 Septiembre, 2015 21:37
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 Me gusta
oblio
(oblio)
9 Septiembre, 2015 12:00
3
embed whitelist selector: div.post
So I’m basically just importing the whole post, there are no other selectors applied.
gwwar
9 Septiembre, 2015 21:14
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 me gusta
sam
(Sam Saffron)
9 Septiembre, 2015 21:17
5
Sounds more or less right, been ages since I looked at that code.
2 Me gusta
oblio
(oblio)
10 Septiembre, 2015 21:38
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)
16 Septiembre, 2015 13:24
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
22 Septiembre, 2015 21:41
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)
22 Septiembre, 2015 21:54
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
22 Septiembre, 2015 22:26
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 me gusta
oblio
(oblio)
22 Septiembre, 2015 23:10
11
I’m a bit unclear
Is this still a bug or did I just misconfigure something?
gwwar
22 Septiembre, 2015 23:52
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 Me gusta
oblio
(oblio)
23 Septiembre, 2015 06:43
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)
23 Septiembre, 2015 08:29
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)
23 Septiembre, 2015 16:12
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 me gusta
oblio
(oblio)
23 Septiembre, 2015 17:00
17
Ah, ok, the placeholder values will probably do
gwwar
24 Septiembre, 2015 22:55
18
5 Me gusta