mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Fix issue with <title> namespace inside an svg (#1284)
This commit is contained in:
parent
f46c8d5f14
commit
c96d181cd1
@ -47,7 +47,8 @@ function finalizeCreateArgs(createArgs, builder) {
|
||||
const MAYBE_SVG = {
|
||||
a: true,
|
||||
script: true,
|
||||
style: true
|
||||
style: true,
|
||||
title: true
|
||||
};
|
||||
|
||||
const SIMPLE_ATTRS = {
|
||||
|
||||
36
test/compiler/fixtures-vdom/svg-title/expected.js
Normal file
36
test/compiler/fixtures-vdom/svg-title/expected.js
Normal file
@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
var marko_template = module.exports = require("marko/src/vdom").t(),
|
||||
components_helpers = require("marko/src/components/helpers"),
|
||||
marko_registerComponent = components_helpers.rc,
|
||||
marko_componentType = marko_registerComponent("/marko-test$1.0.0/compiler/fixtures-vdom/svg-title/template.marko", function() {
|
||||
return module.exports;
|
||||
}),
|
||||
marko_renderer = components_helpers.r,
|
||||
marko_defineComponent = components_helpers.c,
|
||||
marko_helpers = require("marko/src/runtime/vdom/helpers"),
|
||||
marko_createElement = marko_helpers.e,
|
||||
marko_const = marko_helpers.const,
|
||||
marko_const_nextId = marko_const("a0adc5"),
|
||||
marko_node0 = marko_createElement("svg", {
|
||||
width: "140",
|
||||
height: "30"
|
||||
}, "0", null, 1, 1, {
|
||||
i: marko_const_nextId()
|
||||
})
|
||||
.e("g", null, null, null, 1, 1)
|
||||
.e("title", null, null, null, 1, 1)
|
||||
.t("This is a tool tip");
|
||||
|
||||
function render(input, out, __component, component, state) {
|
||||
var data = input;
|
||||
|
||||
out.n(marko_node0, component);
|
||||
}
|
||||
|
||||
marko_template._ = marko_renderer(render, {
|
||||
___implicit: true,
|
||||
___type: marko_componentType
|
||||
});
|
||||
|
||||
marko_template.Component = marko_defineComponent({}, marko_template._);
|
||||
5
test/compiler/fixtures-vdom/svg-title/template.marko
Normal file
5
test/compiler/fixtures-vdom/svg-title/template.marko
Normal file
@ -0,0 +1,5 @@
|
||||
<svg width="140" height="30">
|
||||
<g>
|
||||
<title>This is a tool tip</title>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 95 B |
Loading…
x
Reference in New Issue
Block a user