diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-01-26 23:08:40 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-01-26 23:08:40 +0000 |
| commit | afbd910722cc479ccf653e37d2bc035460beb146 (patch) | |
| tree | 22ff1a225eaf70bc8bf10a3006775e5f019587a2 | |
| parent | 1022d08660f61139d0b3a1a4f3fc4c539bfb1a2f (diff) | |
| download | webtrees-afbd910722cc479ccf653e37d2bc035460beb146.tar.gz webtrees-afbd910722cc479ccf653e37d2bc035460beb146.tar.bz2 webtrees-afbd910722cc479ccf653e37d2bc035460beb146.zip | |
meta-description header double-escaped
| -rw-r--r-- | includes/functions/functions_print.php | 16 | ||||
| -rw-r--r-- | library/WT/Controller/Page.php | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/includes/functions/functions_print.php b/includes/functions/functions_print.php index c902b5265e..444699ad75 100644 --- a/includes/functions/functions_print.php +++ b/includes/functions/functions_print.php @@ -227,16 +227,16 @@ function print_pedigree_person($person, $style=1, $count=0, $personcount="1") { // now added as a function here. function header_links($META_DESCRIPTION, $META_ROBOTS, $META_GENERATOR, $LINK_CANONICAL) { - $header_links=''; - if (!empty($LINK_CANONICAL)) { - $header_links.= '<link rel="canonical" href="'. $LINK_CANONICAL. '">'; + $header_links = ''; + if ($LINK_CANONICAL) { + $header_links .= '<link rel="canonical" href="' . $LINK_CANONICAL . '">'; } - if (!empty($META_DESCRIPTION)) { - $header_links.= '<meta name="description" content="'. WT_Filter::escapeHtml($META_DESCRIPTION). '">'; + if ($META_DESCRIPTION) { + $header_links .= '<meta name="description" content="' . $META_DESCRIPTION . '">'; } - $header_links.= '<meta name="robots" content="'. $META_ROBOTS. '">'; - if (!empty($META_GENERATOR)) { - $header_links.= '<meta name="generator" content="'. $META_GENERATOR. '">'; + $header_links .= '<meta name="robots" content="' . $META_ROBOTS . '">'; + if ($META_GENERATOR) { + $header_links .= '<meta name="generator" content="' . $META_GENERATOR . '">'; } return $header_links; } diff --git a/library/WT/Controller/Page.php b/library/WT/Controller/Page.php index 3bfee79c14..3c654b1605 100644 --- a/library/WT/Controller/Page.php +++ b/library/WT/Controller/Page.php @@ -137,7 +137,7 @@ class WT_Controller_Page extends WT_Controller_Base { $META_ROBOTS = $this->meta_robots; $META_DESCRIPTION = WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_DESCRIPTION') : ''; if (!$META_DESCRIPTION) { - $META_DESCRIPTION = WT_TREE_TITLE; + $META_DESCRIPTION = strip_tags(WT_TREE_TITLE); } $META_GENERATOR = WT_WEBTREES . ' ' . WT_VERSION . ' - ' . WT_WEBTREES_URL; $META_TITLE = WT_GED_ID ? get_gedcom_setting(WT_GED_ID, 'META_TITLE') : ''; |
