yosinch / editing

document.execCommand in JavaScript for Blink
4 stars 6 forks source link

createLink: createLink should not add "name" attribute to newly created A element. #15

Closed yosinch closed 10 years ago

yosinch commented 10 years ago

Test cases:

before:   <div contenteditable><a name="abc">foo^bar|baz</a></div>
expected: <div contenteditable><a name="abc">foo</a><a href="http://www.google.com/">^bar|</a><a name="abc">baz</a></div>`
actual:   <div contenteditable><a name="abc">foo</a><a href="http://www.google.com/" name="abc">^bar|</a><a name="abc">baz</a></div>