Open6

Markdown変換テスト

waddywaddy

before

Figma

Blueprint UE

Gists

https://gist.github.com/hofmannsven/9164408
https://gist.github.com/lmars/8be1952a8d03f8a31b17

specific file

https://gist.github.com/hofmannsven/9164408?file=my.cnf

codesandbox

👇Specify multiple files option

👇must raise error

「https://codesandbox.io/embed/」から始まる正しいURLを入力してください 「https://codesandbox.io/embed/」から始まる正しいURLを入力してください

stackblitz

👇must raise error

StackBlitzのembed用のURLを指定してください StackBlitzのembed用のURLを指定してください

youtube

slideshare

speakerdeck

jsfiddle

codepen

Twitter

👇html tag cannot be embedded.

<iframe width="560" height="315" src="https://www.youtube.com/embed/ToLJE4YEQRI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allow="fullscreen"></iframe>

waddywaddy

after

Figma

Blueprint UE

Gists

https://gist.github.com/hofmannsven/9164408
https://gist.github.com/lmars/8be1952a8d03f8a31b17

specific file

https://gist.github.com/hofmannsven/9164408?file=my.cnf

codesandbox

👇Specify multiple files option

👇must raise error

「https://codesandbox.io/embed/」から始まる正しいURLを入力してください 「https://codesandbox.io/embed/」から始まる正しいURLを入力してください

stackblitz

👇must raise error

StackBlitzのembed用のURLを指定してください StackBlitzのembed用のURLを指定してください

youtube

slideshare

speakerdeck

jsfiddle

codepen

Twitter

👇html tag cannot be embedded.

<iframe width="560" height="315" src="https://www.youtube.com/embed/ToLJE4YEQRI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allow="fullscreen"></iframe>

waddywaddy

数式before

&&&

a,b,chogeを参照。
a,b,chogeを参照。
a,b,choge$を参照。
a,b,c$aを参照。

this $ should be escaped
this $$ should be escaped

test on markdown-it-textmath

a

a\ne0

\varphi

// 👇can scroll horizontally

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

<script>alert("a")</script>1+1=2

1+1<3

a \backslash

You get 3$ if you solve 1+2

If you solve 1+2 you get $3

\frac{1}{2}

\begin{pmatrix}x\\y\end{pmatrix}

a^{b}

a^*b with a^*

\sum_{i=1}^n


↓ はみ出たら横スクロール

e^{i\theta} = \cos\theta + i\sin\theta e^{i\theta} = \cos\theta + i\sin\theta e^{i\theta} = \cos\theta + i\sin\theta

\sqrt{3x-1}+(1+x)^2

Triangle

Let the right triangle hypothenuse be aligned with the coordinate system x-axis.
The vector loop closure equation then reads

a{\bold e}_\alpha + b\tilde{\bold e}_\alpha + c{\bold e}_x = \bold 0

Resolving for the hypothenuse part c{\bold e}_x in the loop closure equation

-c{\bold e}_x = a{\bold e}_\alpha + b\tilde{\bold e}_\alpha

and squaring

finally results in the Pythagorean theorem (2)

c^2 = a^2 + b^2 (2)

a\ne0

詳細

a\ne0

リンク文字列中は数式にならないべき

text$text

[text$text](https://...$text

$text](https://...$

ふたつ以上の数式もレンダリングされるべき

あああ\omegaいいい『uuu』えええ(7)おおお
あああ\frac{1}{2}いいいuuuえええ(7)おおお
あああabcいいいuuuえええ(7)おおお
あああ\alpha\omegaいいいuuuえええ(7)おおお

あああaいいいuuuえええ(7)おおお
あああ\omegaいいいえええ(7)おおお
あああ\omegaいいいuuuえええおおお
あああ\omegaいいいuuuえええ7おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいい(https://arxiv.org)えええ(7)おおお
あああ\omegaいいいuuuえええ\exp xyzおおお

a=bという数式はこちらを参照text$text(7)

waddywaddy

数式after

&&&

a,b,chogeを参照。
a,b,chogeを参照。
a,b,choge$を参照。
a,b,c$aを参照。

this $ should be escaped
this $$ should be escaped

test on markdown-it-textmath

a

a\ne0

\varphi

// 👇can scroll horizontally

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

<script>alert("a")</script>1+1=2

1+1<3

a \backslash

You get 3$ if you solve 1+2

If you solve 1+2 you get $3

\frac{1}{2}

\begin{pmatrix}x\\y\end{pmatrix}

a^{b}

a^*b with a^*

\sum_{i=1}^n


↓ はみ出たら横スクロール

e^{i\theta} = \cos\theta + i\sin\theta e^{i\theta} = \cos\theta + i\sin\theta e^{i\theta} = \cos\theta + i\sin\theta

\sqrt{3x-1}+(1+x)^2

Triangle

Let the right triangle hypothenuse be aligned with the coordinate system x-axis.
The vector loop closure equation then reads

a{\bold e}_\alpha + b\tilde{\bold e}_\alpha + c{\bold e}_x = \bold 0

Resolving for the hypothenuse part c{\bold e}_x in the loop closure equation

-c{\bold e}_x = a{\bold e}_\alpha + b\tilde{\bold e}_\alpha

and squaring

finally results in the Pythagorean theorem (2)

c^2 = a^2 + b^2 (2)

a\ne0

詳細

a\ne0

リンク文字列中は数式にならないべき

text$text

[text$text](https://...$text

$text](https://...$

ふたつ以上の数式もレンダリングされるべき

あああ\omegaいいい『uuu』えええ(7)おおお
あああ\frac{1}{2}いいいuuuえええ(7)おおお
あああabcいいいuuuえええ(7)おおお
あああ\alpha\omegaいいいuuuえええ(7)おおお

あああaいいいuuuえええ(7)おおお
あああ\omegaいいいえええ(7)おおお
あああ\omegaいいいuuuえええおおお
あああ\omegaいいいuuuえええ7おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいいuuuえええ(7)おおお
あああ\omegaいいい(https://arxiv.org)えええ(7)おおお
あああ\omegaいいいuuuえええ\exp xyzおおお

a=bという数式はこちらを参照text$text(7)

waddywaddy

xss

"<img/src=./ onerror=alert(location)> e^{i\theta} = i\sin\thetae^{i\theta}
e^{i\theta"<img/src=./ onerror=alert(location)>} = \cos\theta + i\sin\thetae^{i\theta}

.
normal link
.

<p><a href="javascript">normal link</a></p>
.

Should not allow some protocols in links and images
.
[xss link](<javascript:alert(1)>)

[xss link](<JAVASCRIPT:alert(1)>)

[xss link](<vbscript:alert(1)>)

[xss link](<VBSCRIPT:alert(1)>)

[xss link](file:///123)
.

<p>[xss link](javascript:alert(1))</p>
<p>[xss link](JAVASCRIPT:alert(1))</p>
<p>[xss link](vbscript:alert(1))</p>
<p>[xss link](VBSCRIPT:alert(1))</p>
<p>[xss link](file:///123)</p>
.

.
[xss link](<"><script>alert("xss")</script>>)

[xss link](<Javascript:alert(1)>)

[xss link](<Javascript:alert(1)>)

[xss link](<Javascript:alert(1)>)
.

<p><a href="%22%3E%3Cscript%3Ealert(%22xss%22)%3C/script%3E">xss link</a></p>
<p>[xss link](Javascript:alert(1))</p>
<p><a href="&#74;avascript:alert(1)">xss link</a></p>
<p><a href="&#74;avascript:alert(1)">xss link</a></p>
.

.
[xss link](<javascript:alert(1)>)
.

<p>xss link</p>
.

.
[xss link](<javascript:alert(1)>)
.

<p>[xss link](javascript:alert(1))</p>
.

Should not allow data-uri except some whitelisted mimes
.

.

<p><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" alt=""></p>
.

.
[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)
.

<p>[xss link](data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K)</p>
.

.
normal link
.

<p><a href="/javascript:link">normal link</a></p>
.

Image parser use the same code base as link.
.
![xss link](<javascript:alert(1)>)
.

<p>![xss link](javascript:alert(1))</p>
.

Autolinks
.
<javascript:alert(1)>

<javascript:alert(1)>
.

<p><javascript:alert(1)></p>
<p><javascript:alert(1)></p>
.

Linkifier
.
javascript:alert(1)

javascript:alert(1)
.

<p>javascript:alert(1)</p>
<p>javascript:alert(1)</p>
.

References
.
[test]: javascript:alert(1)
.

<p>[test]: javascript:alert(1)</p>
.

Make sure we decode entities before split:
.

test1;
test2

.

<pre><code class="js">test1
</code></pre>
<pre><code class="js">test2
</code></pre>

.

<script>alert("xss")</script>
<script>alert("xss")</script>
hello
hello;
<script>alert("xss")</script>
hello

<script>alert("xss")</script>