mirror of
				https://github.com/redmine/redmine.git
				synced 2025-10-31 18:36:07 +01:00 
			
		
		
		
	FIxed: inline images not displayed in atom feeds (#3391).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2768 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
		| @@ -24,7 +24,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |||||||
|         xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail |         xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail | ||||||
|       end if author |       end if author | ||||||
|       xml.content "type" => "html" do |       xml.content "type" => "html" do | ||||||
|         xml.text! textilizable(item.event_description, :only_path => false) |         xml.text! textilizable(item, :event_description, :only_path => false) | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|   | |||||||
| @@ -23,7 +23,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |||||||
|           xml.text! '<li>' + show_detail(detail, false) + '</li>' |           xml.text! '<li>' + show_detail(detail, false) + '</li>' | ||||||
|         end |         end | ||||||
|         xml.text! '</ul>' |         xml.text! '</ul>' | ||||||
|         xml.text! textilizable(change.notes) unless change.notes.blank? |         xml.text! textilizable(change, :notes, :only_path => false) unless change.notes.blank? | ||||||
|       end |       end | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								test/fixtures/attachments.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								test/fixtures/attachments.yml
									
									
									
									
										vendored
									
									
								
							| @@ -109,4 +109,16 @@ attachments_009: | |||||||
|   filename: version_file.zip |   filename: version_file.zip | ||||||
|   author_id: 2 |   author_id: 2 | ||||||
|   content_type: application/octet-stream |   content_type: application/octet-stream | ||||||
|  | attachments_010:  | ||||||
|  |   created_on: 2006-07-19 21:07:27 +02:00 | ||||||
|  |   container_type: Issue | ||||||
|  |   container_id: 2 | ||||||
|  |   downloads: 0 | ||||||
|  |   disk_filename: 060719210727_picture.jpg | ||||||
|  |   digest: b91e08d0cf966d5c6ff411bd8c4cc3a2 | ||||||
|  |   id: 10 | ||||||
|  |   filesize: 452 | ||||||
|  |   filename: picture.jpg | ||||||
|  |   author_id: 2 | ||||||
|  |   content_type: image/jpeg | ||||||
|    |    | ||||||
							
								
								
									
										7
									
								
								test/fixtures/journals.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								test/fixtures/journals.yml
									
									
									
									
										vendored
									
									
								
							| @@ -13,4 +13,11 @@ journals_002: | |||||||
|   journalized_type: Issue |   journalized_type: Issue | ||||||
|   user_id: 2 |   user_id: 2 | ||||||
|   journalized_id: 1 |   journalized_id: 1 | ||||||
|  | journals_003:  | ||||||
|  |   created_on: <%= 1.days.ago.to_date.to_s(:db) %> | ||||||
|  |   notes: "A comment with inline image: !picture.jpg!" | ||||||
|  |   id: 3 | ||||||
|  |   journalized_type: Issue | ||||||
|  |   user_id: 2 | ||||||
|  |   journalized_id: 2 | ||||||
|    |    | ||||||
| @@ -369,6 +369,14 @@ class IssuesControllerTest < Test::Unit::TestCase | |||||||
|                         :descendant => { :tag => 'a', :content => /#4$/ } |                         :descendant => { :tag => 'a', :content => /#4$/ } | ||||||
|   end |   end | ||||||
|    |    | ||||||
|  |   def test_show_atom | ||||||
|  |     get :show, :id => 2, :format => 'atom' | ||||||
|  |     assert_response :success | ||||||
|  |     assert_template 'changes.rxml' | ||||||
|  |     # Inline image | ||||||
|  |     assert @response.body.include?("<img src=\"http://test.host/attachments/download/10\" alt=\"\" />") | ||||||
|  |   end | ||||||
|  |    | ||||||
|   def test_new_routing |   def test_new_routing | ||||||
|     assert_routing( |     assert_routing( | ||||||
|       {:method => :get, :path => '/projects/1/issues/new'}, |       {:method => :get, :path => '/projects/1/issues/new'}, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user