We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6c6fb5 commit 06a0331Copy full SHA for 06a0331
src/Providers/OpenGraph.php
@@ -129,7 +129,11 @@ public function getCode()
129
*/
130
public function getUrl()
131
{
132
- return $this->bag->get('url');
+ $url = $this->bag->get('url');
133
+
134
+ if ($url !== $this->request->getAbsolute('/')) {
135
+ return $url;
136
+ }
137
}
138
139
/**
tests/WiredTest.php
@@ -0,0 +1,19 @@
1
+<?php
2
3
+class WiredTest extends TestCaseBase
4
+{
5
+ public function testOne()
6
+ {
7
+ $this->assertEmbed(
8
+ 'http://www.wired.com/?p=2064839',
9
+ [
10
+ 'title' => 'Review: Yi 4K Action Camera',
11
+ 'description' => "For nearly two years GoPro’s Hero4 Black has been the standard-bearer for action cameras. But there's a new contender.",
12
+ 'imageWidth' => 2680,
13
+ 'imageHeight' => 1507,
14
+ 'type' => 'rich',
15
+ 'code' => true,
16
+ ]
17
+ );
18
19
+}
0 commit comments