Commit 8c1316f3 authored by Melissa Draper's avatar Melissa Draper
Browse files

Add new docs filter for different spreadsheet url (bug #843588)

It seems that the google spreadsheets published url changed and was
not being caught by the existing regexs. This adds a new regex that
catches the new format.

Cherry-picked from 8fd516c1



Change-Id: Ic51ae17a789f2f97647796d9a4daa5d13d2d0108
Signed-off-by: default avatarMelissa Draper <melissa@catalyst.net.nz>
parent f7d9a23f
......@@ -151,6 +151,14 @@ class PluginBlocktypeGoogleApps extends SystemBlocktype {
'url' => 'http://docs.google.com/$1document/pub?id=$2',
'type' => 'iframe',
),
// docs.google.com - Google document (after Sept 2011) incl. custom domain document
// $1 - domain, e.g. /a/domainname/
// $2 - id, key, etc. of the document
array(
'match' => '#.*docs.google.com/([a-zA-Z0-9\_\-\.\/]*)spreadsheet/pub.*key=([a-zA-Z0-9\_\-]+).*#',
'url' => 'http://docs.google.com/$1spreadsheet/pub?key=$2',
'type' => 'iframe',
),
// spreadsheets.google.com/viewform - Google form incl. custom domain form
// $1 - domain, e.g. /a/domainname/
// $2 - id, key, etc. of the form
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment