mirror of https://github.com/go-gitea/gitea.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
363 B
8 lines
363 B
import {html, htmlEscape, htmlRaw} from './html.ts'; |
|
|
|
test('html', async () => { |
|
expect(html`<a>${'<>&\'"'}</a>`).toBe(`<a><>&'"</a>`); |
|
expect(html`<a>${htmlRaw('<img>')}</a>`).toBe(`<a><img></a>`); |
|
expect(html`<a>${htmlRaw`<img ${'&'}>`}</a>`).toBe(`<a><img &></a>`); |
|
expect(htmlEscape(`<a></a>`)).toBe(`<a></a>`); |
|
});
|
|
|