﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
23176,Inserting media with multiple newlines in caption breaks HTML,jonieske,azaozz,"Steps to reproduce:
1. Open add media dialog in editor to insert image
2. Select image, enter caption with multiple newlines, eg:
""one[[BR]]
two[[BR]]
three""
3. Leave alt text field empty
4. Insert image into post
5. Save/Update

As a result, HTML code breaks and image isn't displayed. This happens because caption is inserted to alt attribute in case it's empty, and newlines break the markup. Toggling between text and visual modes before initial post save fixes the code though.

Proposed fix:
Remove newlines from content that is automatically inserted to alt attribute.",defect (bug),closed,normal,3.5.1,Media,3.5,minor,fixed,has-patch,kovshenin
