Repository: preactjs/preact-render-to-string (js)

Issue:
xlink:href becomes xlink::href
#310 fixes `xlinkHref` attributes but breaks `xlink:href` by adding another colon:

```js
> require('preact-render-to-string').renderToString({constructor: undefined, type: 'use', props: {'xlink:href': 'hi'}})
'<use xlink::href="hi"></use>'
```

Perhaps `NAMESPACE_REPLACE_REGEX` should just be `/^(xlink|xmlns|xml)([A-Z])/`?

Pull request description:
avoid adding double colon
fixes #314 

Patch:
diff --git a/.changeset/beige-starfishes-worry.md b/.changeset/beige-starfishes-worry.md
new file mode 100644
index 0000000..4feae9e
--- /dev/null
+++ b/.changeset/beige-starfishes-worry.md
@@ -0,0 +1,5 @@
+---
+"preact-render-to-string": patch
+---
+
+avoid adding double colon for namespaced attributes
diff --git a/src/util.js b/src/util.js
index bc80ea4..397d01a 100644
--- a/src/util.js
+++ b/src/util.js
@@ -1,6 +1,6 @@
 export const VOID_ELEMENTS = /^(?:area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)$/;
 export const UNSAFE_NAME = /[\s\n\\/='"\0<>]/;
-export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)(:|[A-Z])/;
+export const NAMESPACE_REPLACE_REGEX = /^(xlink|xmlns|xml)([A-Z])/;
 export const HTML_LOWER_CASE = /^accessK|^auto[A-Z]|^ch|^col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|readO|rowS|spellC|src[A-Z]|tabI|item[A-Z]/;
 export const SVG_CAMEL_CASE = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;
 


Test patch:
diff --git a/test/render.test.js b/test/render.test.js
index e6b6fe1..f8060d8 100644
--- a/test/render.test.js
+++ b/test/render.test.js
@@ -337,6 +337,12 @@ describe('render', () => {
 				`<svg><image xlink:href="#"></image><foreignObject><div xlink:href="#"></div></foreignObject><g><image xlink:href="#"></image></g></svg>`
 			);
 		});
+
+		it('should not add extra colon on SVG elements', () => {
+			let rendered = render(<svg>{h('image', { 'xlink:href': '#' })}</svg>);
+
+			expect(rendered).to.equal(`<svg><image xlink:href="#"></image></svg>`);
+		});
 	});
 
 	describe('Functional Components', () => {