root/trunk/radiant/app/models/file_not_found_page.rb

Revision 557, 0.6 kB (checked in by danshep, 11 months ago)

Escape attempted_url tag

Line 
1 class FileNotFoundPage < Page
2  
3   description %{
4     A "File Not Found" page can be used to override the default error
5     page in the event that a page is not found among a page's children.
6     
7     To create a "File Not Found" error page for an entire Web site, create
8     a page that is a child of the root page and assign it "File Not Found"
9     page type.
10   }
11  
12   tag "attempted_url" do
13     CGI.escapeHTML(request.request_uri) unless request.nil?
14   end
15    
16   def virtual?
17     true
18   end
19    
20   def headers
21     { 'Status' => '404 Not Found' }
22   end
23    
24   def cache?
25     false
26   end
27  
28 end
Note: See TracBrowser for help on using the browser.