translate copied links in longdesc attributes
closes #ADMIN-1409 Change-Id: I5291355cb21246a638e71003c70dc131f7f6e8e2 Reviewed-on: https://gerrit.instructure.com/163522 Tested-by: Jenkins Reviewed-by: Mysti Sadler <mysti@instructure.com> QA-Review: Mysti Sadler <mysti@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
154020c668
commit
388d892d21
|
@ -23,7 +23,7 @@ class ImportedHtmlConverter
|
|||
include HtmlTextHelper
|
||||
|
||||
CONTAINER_TYPES = ['div', 'p', 'body']
|
||||
LINK_ATTRS = ['rel', 'href', 'src', 'data', 'value']
|
||||
LINK_ATTRS = ['rel', 'href', 'src', 'data', 'value', 'longdesc']
|
||||
|
||||
attr_reader :link_parser, :link_resolver, :link_replacer
|
||||
|
||||
|
|
|
@ -608,6 +608,17 @@ describe ContentMigration do
|
|||
expect(@copy_to.reload.syllabus_body).to include "/courses/#{@copy_to.id}/files/#{att2.id}/download"
|
||||
end
|
||||
|
||||
it "should copy weird longdesc things" do
|
||||
page = @copy_from.wiki_pages.create!(:title => "page")
|
||||
@copy_from.syllabus_body = "<img longdesc=\"/courses/#{@copy_from.id}/pages/#{page.url}/>"
|
||||
@copy_from.save!
|
||||
|
||||
run_course_copy
|
||||
|
||||
page2 = @copy_to.wiki_pages.where(:migration_id => mig_id(page)).first
|
||||
expect(@copy_to.reload.syllabus_body).to include "/courses/#{@copy_to.id}/pages/#{page2.url}"
|
||||
end
|
||||
|
||||
it "should re-use kaltura media objects" do
|
||||
expect {
|
||||
media_id = '0_deadbeef'
|
||||
|
|
Loading…
Reference in New Issue