aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--application/FeedBuilder.php4
-rw-r--r--tests/plugins/PluginMarkdownTest.php13
2 files changed, 2 insertions, 15 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php
index b0aa5764..1c9812a4 100644
--- a/application/FeedBuilder.php
+++ b/application/FeedBuilder.php
@@ -125,7 +125,7 @@ class FeedBuilder
125 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn; 125 $data['show_dates'] = !$this->hideDates || $this->isLoggedIn;
126 // Remove leading slash from REQUEST_URI. 126 // Remove leading slash from REQUEST_URI.
127 $data['self_link'] = escape(server_url($this->serverInfo)) 127 $data['self_link'] = escape(server_url($this->serverInfo))
128 . escape($this->serverInfo['REQUEST_URI']); 128 . escape($this->serverInfo['REQUEST_URI']);
129 $data['index_url'] = $pageaddr; 129 $data['index_url'] = $pageaddr;
130 $data['usepermalinks'] = $this->usePermalinks === true; 130 $data['usepermalinks'] = $this->usePermalinks === true;
131 $data['links'] = $linkDisplayed; 131 $data['links'] = $linkDisplayed;
@@ -143,7 +143,7 @@ class FeedBuilder
143 */ 143 */
144 protected function buildItem($link, $pageaddr) 144 protected function buildItem($link, $pageaddr)
145 { 145 {
146 $link['guid'] = $pageaddr .'?'. smallHash($link['linkdate']); 146 $link['guid'] = $pageaddr .'?'. $link['shorturl'];
147 // Check for both signs of a note: starting with ? and 7 chars long. 147 // Check for both signs of a note: starting with ? and 7 chars long.
148 if ($link['url'][0] === '?' && strlen($link['url']) === 7) { 148 if ($link['url'][0] === '?' && strlen($link['url']) === 7) {
149 $link['url'] = $pageaddr . $link['url']; 149 $link['url'] = $pageaddr . $link['url'];
diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php
index 4a67b2dc..17ef2280 100644
--- a/tests/plugins/PluginMarkdownTest.php
+++ b/tests/plugins/PluginMarkdownTest.php
@@ -185,17 +185,4 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase
185 $data = process_markdown($md); 185 $data = process_markdown($md);
186 $this->assertEquals($html, $data); 186 $this->assertEquals($html, $data);
187 } 187 }
188
189 /**
190 * Test hashtag links processed with markdown.
191 */
192 function testMarkdownHashtagLinks()
193 {
194 $md = file_get_contents('tests/plugins/resources/markdown.md');
195 $md = format_description($md);
196 $html = file_get_contents('tests/plugins/resources/markdown.html');
197
198 $data = process_markdown($md);
199 $this->assertEquals($html, $data);
200 }
201} 188}