-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix for missing Rich Link Preview #4648
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhm? p() already escapes :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right… nvm
| <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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/files_sharing/lib/Controller/ShareController.php is already setting opengraph headers. Those should not be doubled. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@newhinton can you fix this? :)
|
@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