Fix for missing Rich Link Preview#4648
Fix for missing Rich Link Preview#4648newhinton wants to merge 3 commits intonextcloud:masterfrom newhinton:master
Conversation
|
@newhinton, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @jancborchardt and @juliushaertl to be potential reviewers. |
| <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"> | ||
| <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> | ||
|
|
||
| <meta property="og:description" content="<?php p($theme->getTitle()); p(" - "); p($theme->getSlogan()); ?>"/> |
There was a problem hiding this comment.
I think this should be escaped somehow, e.g. quotes in the title or slogan could mess up the HTML otherwise.
There was a problem hiding this comment.
Mhm? p() already escapes :-)
| <meta name="mobile-web-app-capable" content="yes"> | ||
| <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> | ||
|
|
||
| <meta property="og:description" content="<?php p($theme->getTitle()); p(" - "); p($theme->getSlogan()); ?>"/> |
There was a problem hiding this comment.
Do we need this in the layout.user.php file? This file will not be crawled by any of the services since it requires login, right?
| <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"> | ||
| <meta name="theme-color" content="<?php p($theme->getColorPrimary()); ?>"> | ||
|
|
||
| <meta property="og:description" content="<?php p($theme->getTitle()); p(" - "); p($theme->getSlogan()); ?>"/> |
There was a problem hiding this comment.
apps/files_sharing/lib/Controller/ShareController.php is already setting opengraph headers. Those should not be doubled. 😉
There was a problem hiding this comment.
|
@newhinton any update here? :) @ChristophWurst @juliushaertl maybe we should complete this fix so we get it in? |
|
I'll check that out. |
|
Sorry, but i dont have time to find out how to add those headers properly :/ |
|
Closing this in favour of #6342. Thanks @newhinton for the initial effort. |
Those commits should add the missing information for rich link previews in apps and social media link previews