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

Markdown XML code-blocks with URLs rendered incorrectly #1442

Closed
3 of 7 tasks
mjwwit opened this issue Apr 4, 2017 · 2 comments
Closed
3 of 7 tasks

Markdown XML code-blocks with URLs rendered incorrectly #1442

mjwwit opened this issue Apr 4, 2017 · 2 comments
Labels
Milestone

Comments

@mjwwit
Copy link
Contributor

mjwwit commented Apr 4, 2017

  • Gitea version (or commit ref): 1.1.0
  • Git version: n/a
  • Operating system: Mac OS X (Chrome 57, Safari 10, Firefox 49)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
    • Not relevant
  • Log gist: n/a

Description

The rendering of markdown XML code-blocks is incorrect if the code-block contains a URL. I'm guessing the JS code responsible for parsing URLs conflicts with highlight.js.

Screenshots

screen shot 2017-04-04 at 13 11 44

@lunny lunny added the type/bug label Apr 4, 2017
@lunny lunny added this to the 1.x.x milestone Apr 4, 2017
@lunny lunny modified the milestones: 1.2.0, 1.x.x Apr 7, 2017
@Lourens-Rich
Copy link

Lourens-Rich commented Apr 8, 2017

I have same problem with this code example:

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
     It will be read and overwritten.
     DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
    <DT><H3 ADD_DATE="1483712399" LAST_MODIFIED="1483712563" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks bar</H3>
    <DL><p>
        <DT><A HREF="https://git.r208.tk/" ADD_DATE="1483712563" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC5ElEQVQ4jYVTz2sbZxB98+1qV5J3V9auHGFbTu26JTVJCUkgtx5Kaemh9ND+CS39QUsJTegt9LuE9FQTck0OpaeqLQ2E/DAtVS+hDYWEFmxDbUMiWZEc2ZIsrbXa1eqbXBITm4IfzGHgvWGYeQ/YBymlKJVKerFY1JiZmJmKxaJWKpV0Zqb9/D04kPA/HP35hoi4XudXu6r5ZsbS5hI6XBIaKxbNfhQve0lngYiW9mh2Jy8WjVru7YvNyu+fJ2r3DTyqgv02mBJIjLqg8TkEuSN9w33x0sut387j1EcxETGxlIKkVOsNfsfe+u765sIXHFY7AzUECQMEAngIjkOwP/AM7/1vMHLiw9ensvSHlFLokJKZmW7cw9pp/792Kuo7hgsdCoTh0/UEQDqQEz5r1NhebyN4enBFzExExCtLf57UkuMLtLXshUu3WG+VMfA7AgD0EVuF2UlKHX0XYXpqJ2Olqs5o9vathV/PEgBUyytvWbb9Y7/fd5rtQG01O2IYR2oYR8SsYBgWm6YjUklWNOxSfmIiDoPBA9bN46JSqaQINJ9OW45lZwbeaIqm8hY7piLbBI05FkFUaVvdZMcNaPaVY4oZiW53u1MoxCzSafIYOAyioWkm9Y16Hc1WE/lCgaamZ7jWqXFF/55a2Z/x1+Mr6HUDEUWDYcoaeanR6I0K152sC03c1RNpTWh65I3l1cO1Vfx7729VXlvFzdIvqNZ9ReFpLNZXlLDDaPLwrGYaiTtjY4sNAoByeWU2IbRrXu7QsUEcI+gFqrb+UIVBD7XNBu48vor4UFUI0xRfvfYTVDt5f6ez8d7M3IkHGgDMz19uKfZ/cGw33un54ztd37MsW7OcjJguzIqMmReOmuE38p8ttx75l7++8OWnH3x8bmPXic9eCQCO47hnznxy/IWJ6SNKxa5SMXLZic1oO7l8/tuL/6yu3u3s1+zampnFgWEqsnYQh6SUgpn3lJRSPJ+dZ3gC4hBt5ltSjVUAAAAASUVORK5CYII=">r208 inc.</A>
    </DL><p>
</DL><p>

lunny pushed a commit that referenced this issue Apr 12, 2017
* Optimize and fix autolink function (#1442)

* Fix bug in autolink recursive fallback function
@mjwwit
Copy link
Contributor Author

mjwwit commented Apr 13, 2017

Fixed in #1444

@mjwwit mjwwit closed this as completed Apr 13, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants