File

mod_ogp/test.lua @ 6201:274fb65904a7

mod_cloud_notify(all the extentions): remove rockspec dependemcy so the prosody community module does not get installed, since trunk already has it. diff --git a/mod_cloud_notify_encrypted/README.md b/mod_cloud_notify_encrypted/README.md --- a/mod_cloud_notify_encrypted/README.md +++ b/mod_cloud_notify_encrypted/README.md @@ -2,9 +2,6 @@ labels: - 'Stage-Alpha' summary: 'Support for encrypted payloads in push notifications' -rockspec: - dependencies: - - mod_cloud_notify ... Introduction diff --git a/mod_cloud_notify_filters/README.md b/mod_cloud_notify_filters/README.md --- a/mod_cloud_notify_filters/README.md +++ b/mod_cloud_notify_filters/README.md @@ -2,9 +2,6 @@ labels: - 'Stage-Alpha' summary: 'Support for push notification filtering rules' -rockspec: - dependencies: - - mod_cloud_notify ... Introduction diff --git a/mod_cloud_notify_priority_tag/README.md b/mod_cloud_notify_priority_tag/README.md --- a/mod_cloud_notify_priority_tag/README.md +++ b/mod_cloud_notify_priority_tag/README.md @@ -2,9 +2,6 @@ labels: - 'Stage-Alpha' summary: 'Support for indicating importance to push notification servers' -rockspec: - dependencies: - - mod_cloud_notify ... Introduction
author Menel <menel@snikket.de>
date Thu, 13 Feb 2025 12:20:46 +0100
parent 4255:38da10e4b593
line wrap: on
line source

local html = [[
<meta property="og:title" content="Example 1 A">
<meta property=og:title content="Example 2 B">
<meta property="og:title" content="Example 3 C" >
<meta property="og:title" content="Example 4 D" />
<meta property="og:title" content="Example 5 E"/>
<meta property=og:title content=Example 6 F/>
<meta property="og:title" content= "Example 7 G" />
<meta property="og:title" itemprop="image primaryImageOfPage" content="Example 8 H" />
<meta property='og:title' content='Example 9 I' />
<meta content="Example 10 J" property="og:title" >
<meta content="Example 11 K" property="og:title">
<meta content="Example 12 L" property="og:title"/>
<meta content="Example 13 M" property="og:title" />
<meta content="Example 14 N" property=og:title >
<meta content=Example 15 O property=og:title >
<meta content= "Example 16 P" property="og:title" />
<meta content="Example 17 Q" itemprop="image primaryImageOfPage"  property="og:title" />
<meta content= 'Example 18 R' property='og:title' />
]]



local meta_pattern = [[<meta (.-)/?>]]
for match in html:gmatch(meta_pattern) do
    local property = match:match([[property=%s*["']?(og:.-)["']?%s]])
    if not property then
        property = match:match([[property=["']?(og:.-)["']$]])
    end

    local content = match:match([[content=%s*["'](.-)["']%s]])
    if not content then
        content = match:match([[content=["']?(.-)["']$]])
    end
    if not content then
        content = match:match([[content=(.-) property]])
    end
    if not content then
        content = match:match([[content=(.-)$]])
    end

    print(property, '\t', content, '\t', match .. "|")
end