Merge pull request #22165 from edx/as/bug/html-editor-url

fixed language issue and added test
This commit is contained in:
Awais Jibran
2019-10-30 14:42:39 +05:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -40,6 +40,14 @@ describe('HTMLEditingDescriptor', function() {
expect(visualEditorStub.getContent()).toEqual('text /c4x/foo/bar/asset/image.jpg');
});
it('Enables spellcheck', () => expect($('.html-editor iframe')[0].contentDocument.body.spellcheck).toBe(true));
it('Retains ascii characters', function() {
const editorData = '<a href="/static/Programación_Gas.pptx">fóó</a>';
const expectedData = '<p><a href="/static/Programación_Gas.pptx">fóó</a></p>'
this.descriptor.getVisualEditor().setContent(editorData)
const savedContent = this.descriptor.getVisualEditor().getContent()
expect(savedContent).toEqual(expectedData);
});
});
describe('Raw HTML Editor', function() {
beforeEach(function() {

View File

@@ -101,6 +101,7 @@
theme: "modern",
skin: 'studio-tmce4',
schema: "html5",
entity_encoding: "raw",
/*
Necessary to preserve relative URLs to our images.