summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
afea684)
Use the page id and the story id to build a more robust permalink URL.
<xsl:text>https://facebook.com</xsl:text>
</xsl:variable>
<xsl:text>https://facebook.com</xsl:text>
</xsl:variable>
+ <!--
+ Extract the page id from an element like:
+ <meta property="al:android:url" content="fb://page/793837197390834">
+
+ The page id will be used to build the permalink.
+ -->
+ <xsl:variable
+ name="page-id"
+ select="substring-after(//meta[@property='al:android:url']/@content, 'fb://page/')"/>
+
<xsl:template match="//div[contains(@class, 'userContentWrapper')]">
<xsl:template match="//div[contains(@class, 'userContentWrapper')]">
+ <xsl:variable name="story-id" select=".//input[@name='ft_ent_identifier']/@value"/>
<xsl:variable name="item-content" select=".//div[contains(@class, 'userContent')]"/>
<xsl:variable name="item-content" select=".//div[contains(@class, 'userContent')]"/>
- <xsl:variable name="item-permalink" select="concat($BaseURL, .//a[@target='']/@href)"/>
+ <xsl:variable
+ name="item-permalink"
+ select="concat($BaseURL, '/permalink.php?id=', $page-id, '&story_fbid=', $story-id)"/>
+
<item>
<title>
<xsl:variable name="item-title" select="$item-content/p"/>
<item>
<title>
<xsl:variable name="item-title" select="$item-content/p"/>