Merge lp:~seancron/mvhub/unique-webpage-title into lp:mvhub

Proposed by Sean Cronin
Status: Merged
Merged at revision: 564
Proposed branch: lp:~seancron/mvhub/unique-webpage-title
Merge into: lp:mvhub
Diff against target: 48 lines (+9/-2)
1 file modified
lib-mvhub/lib/MVHub/Guide.pm (+9/-2)
To merge this branch: bzr merge lp:~seancron/mvhub/unique-webpage-title
Reviewer Review Type Date Requested Status
Dan MacNeil Approve
Review via email: mp+65231@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dan MacNeil (omacneil) wrote :

looks good, I didn't run the tests but trust you did

review: Approve
563. By Sean Cronin <email address hidden>

Escapes special characters in the title now.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib-mvhub/lib/MVHub/Guide.pm'
2--- lib-mvhub/lib/MVHub/Guide.pm 2011-06-06 01:12:44 +0000
3+++ lib-mvhub/lib/MVHub/Guide.pm 2011-06-24 20:35:14 +0000
4@@ -156,7 +156,7 @@
5 );
6
7 # Before returning our page body, let's add some custom content to its title:
8- $self->param( 'title', $heading_name );
9+ $self->param( 'title', CGI::escapeHTML($heading_name) );
10
11 $html
12 .= "<!-- stop generated by MVHub::Guide::browse_one_heading() -->\n";
13@@ -308,6 +308,8 @@
14 # the search box in the search bar of the ensuing page:
15 $tmpl->param( $MVHub::Page::SEARCH_PHRASE_TAG, $search_phrase );
16
17+ $self->param( 'title', CGI::escapeHTML($search_phrase) );
18+
19 return $tmpl->output();
20 }
21
22@@ -394,7 +396,7 @@
23 $tmpl->param( $MVHub::Page::SEARCH_PHRASE_TAG, $search_phrase );
24
25 # Before returning our page body, let's add some custom content to its title:
26- $self->param( 'title', $category_name );
27+ $self->param( 'title', CGI::escapeHTML($category_name) );
28
29 # needed by search_bar.tmpl
30 $self->param( 'site_location', $self->get_config_param('SITE.location') );
31@@ -476,6 +478,8 @@
32 $tmpl->param( $SA_PROGRAMS_LOOP_TAG, $programs_aref );
33 }
34
35+ $self->param( 'title', CGI::escapeHTML( $agency_href->{'agency_name'} ) );
36+
37 return $tmpl->output();
38 }
39
40@@ -526,6 +530,9 @@
41 $tmpl->param( $_, $program_href->{$_} );
42 }
43
44+ $self->param( 'title',
45+ CGI::escapeHTML( $program_href->{'program_name'} ) );
46+
47 return $tmpl->output();
48 }
49

Subscribers

People subscribed via source and target branches