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

Some text (Invalid HTML mistaken for HTML) causes exceptions #78

Open
wcfv opened this issue Sep 6, 2016 · 2 comments
Open

Some text (Invalid HTML mistaken for HTML) causes exceptions #78

wcfv opened this issue Sep 6, 2016 · 2 comments

Comments

@wcfv
Copy link

wcfv commented Sep 6, 2016

 System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at MarkdownDeep.HtmlTag.ParseHelper(StringScanner p) in Z:\markdowndeep\MarkdownDeep\HtmlTag.cs:line 343
@wcfv
Copy link
Author

wcfv commented Sep 6, 2016

Example:

Markdown.Transform("<foo bar bar>")

@pkuma-msft
Copy link

pkuma-msft commented Jun 29, 2017

A markdown containing the following text also throws the same exception, (using version 1.5)

## My heading
<svg width="80px" height="77px" viewBox="0 0 80 77" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
    <defs></defs>
    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
        <g id="A12_PDF_90x90" sketch:type="MSLayerGroup" transform="translate(-1.000000, 0.000000)" fill="#D40000">
            <path d="M3.5619234,74.2449024 C2.66827634,73.4082317 2.36098222,72.4372805 2.56145281,71.3724268 C3.29651163,67.4707805 10.738394,62.2267988 22.1567469,57.4969329 C15.792041,68.3426646 9.5322763,74.9933049 5.61133516,74.9933049 C4.84333516,74.9933049 4.11815869,74.7655915 3.5619234,74.2449024 M68.0202763,56.1268963 C62.346394,54.7775183 57.7087469,51.7486951 53.978394,48.5536646 C61.640041,47.1648476 68.3619234,47.4169756 71.2475705,48.0174817 C74.1882763,48.6292561 75.776041,50.3993171 75.2706293,53.0201341 C74.8616881,55.1404512 72.7633352,56.3837195 70.1430999,56.3837195 C69.464041,56.3837195 68.7496881,56.3001463 68.0202763,56.1268963 M35.032041,43.2970061 C36.490394,39.7831768 37.8894528,36.1106524 39.1275705,32.4601951 C40.4362763,34.7129146 41.8607469,36.9346463 43.4245116,39.0995671 C45.7308646,42.2927195 48.1656881,45.1370244 50.6790999,47.5747317 L50.650394,47.5794268 L50.6598058,47.5883476 C47.2555705,48.2066951 43.6649822,49.0119085 39.9633352,49.9894329 C36.7054528,50.8495793 33.5496881,51.7989329 30.498394,52.8130793 C32.272041,49.4931585 33.8165116,46.2234756 35.032041,43.2970061 M33.7106293,3.18329268 C34.3209822,2.13768902 35.330394,1.49586585 36.4202763,1.49586585 C38.6550999,1.49586585 39.8833352,3.46828659 39.8950999,7.0652195 C39.9073352,10.9424512 38.6536881,17.3034024 36.3327469,24.5644085 C31.9675705,14.3896098 31.9115705,6.2651707 33.7106293,3.18329268 M32.4113352,2.42831707 C29.872041,6.7788171 31.0235705,16.6423293 35.6353352,26.7138354 C34.0296881,31.5329085 32.2118058,36.3970549 29.9242763,41.8917561 C28.0268646,46.451189 25.7614528,51.1115671 23.3656881,55.3878841 C10.2852175,60.5633171 1.96333516,66.4261159 1.08380575,71.0949451 C0.78874693,72.6635854 1.27251163,74.1632073 2.53980575,75.3459085 C3.29462928,76.0501768 4.90639399,76.9746463 7.258394,76.9746463 C14.7788646,76.9746463 23.1496881,66.0026159 29.4315705,54.7601463 C32.9228646,53.5549085 36.5661587,52.4374695 40.3482763,51.4397561 C44.424041,50.3636341 48.3609822,49.4978537 52.058394,48.8649512 C61.1562763,57.0649817 69.1892175,58.2983902 73.1906293,58.2983902 C78.1849822,58.2983902 79.6075705,56.2358232 80.104041,54.92025 C80.8226293,53.0159085 80.1638058,50.9129634 79.1426293,49.8194695 C76.864041,47.3808232 72.0866293,46.0920122 65.3266293,46.0920122 C61.562394,46.0920122 57.2602763,46.4864024 52.5322763,47.2639146 C49.7986293,44.7262012 47.146394,41.6856402 44.6442763,38.2225183 C42.8433352,35.729878 41.210394,33.165872 39.7572175,30.5600793 C42.1515705,23.1723049 43.8198058,16.0840793 43.8198058,10.6940793 C43.8198058,6.6468841 42.5228646,0 36.4927469,0 C34.9219234,0 33.2621587,0.97048171 32.4113352,2.42831707" id="Imported-Layers" sketch:type="MSShapeGroup"></path>
        </g>
    </g>
<script type="text/javascript"><![CDATA[
    function malsvgsvg(){
		alert(document.cookie);
		console.log('hellofromconsole');
		return 0;
    }

    window["myvarpkuma"] = malsvgsvg();
  ]]></script>    
</svg>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants