Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: anwiki/_override/global/global/global.tpl.php

Issue 10227005: Collect <meta> tags at top of <head> to fix issue with Facebook's Open Graph parsing (Closed)
Patch Set: Created April 10, 2013, 10:52 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: anwiki/_override/global/global/global.tpl.php
===================================================================
--- a/anwiki/_override/global/global/global.tpl.php
+++ b/anwiki/_override/global/global/global.tpl.php
@@ -25,7 +25,7 @@
{
do
{
- $newHTML = preg_replace('/(<\/head>.*<body\b.*)(<meta\b[^>]*\/>\s*)/is', '$2$1', $HTML, 1, $count);
+ $newHTML = preg_replace('/(<head\b[^>]*>)(([^<]*<meta)*([^<]*<(?!meta))+[^<]*)(<meta\b[^>]*>\s*)/is', '$1$5$2', $HTML, 1, $count);
if ($newHTML)
$HTML = $newHTML;
} while ($count);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld