Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release v0.1.153 #492

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"packages": [
"packages/*"
],
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"npmClient": "pnpm"
}
2 changes: 1 addition & 1 deletion packages/zenn-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenn-cli",
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"description": "Preview Zenn content locally.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/zenn-content-css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenn-content-css",
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"license": "MIT",
"description": "Zenn flavor content style.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/zenn-embed-elements/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenn-embed-elements",
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"license": "MIT",
"description": "Web components for embedded contents.",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { describe, test, expect } from 'vitest';
import { isCodesandboxUrl } from '../../src/utils/url-matcher';

describe('isCodesandboxUrlのテスト', () => {
describe('Trueを返す場合', () => {
test('Codesandboxの埋め込みURL', () => {
const url =
'https://codesandbox.io/embed/new?view=Editor+%2B+Preview';

expect(isCodesandboxUrl(url)).toBe(true);
});
});

describe('Falseを返す場合', () => {
test('XSSを含んでいる', () => {
const url = `https://codesandbox.io/embed/new?view=Editor+%2B+Preview"></iframe><img src onerror=alert(document.domain)>/`;
expect(isCodesandboxUrl(url)).toBe(false);
});
});
});
2 changes: 1 addition & 1 deletion packages/zenn-markdown-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenn-markdown-html",
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"license": "MIT",
"description": "Convert markdown to zenn flavor html.",
"main": "lib/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/zenn-markdown-html/src/utils/url-matcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function isStackblitzUrl(url: string): boolean {
}

export function isCodesandboxUrl(url: string): boolean {
return /^https:\/\/codesandbox\.io\/embed\/[a-zA-Z0-9\-_/.@?&=%,]+$/.test(
return /^https:\/\/codesandbox\.io\/embed\/[a-zA-Z0-9\-_/.@?&=%,+]+$/.test(
url
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/zenn-model/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zenn-model",
"version": "0.1.152",
"version": "0.1.153-alpha.0",
"license": "MIT",
"description": "Model utils for Zenn contents",
"main": "lib/index.js",
Expand Down
Loading