SDL2-Docs icon indicating copy to clipboard operation
SDL2-Docs copied to clipboard

Angle brackets are not escaped in code fragments

Open jep-dev opened this issue 7 years ago • 2 comments

Hi there, I love the offline docs. The title is pretty self-explanatory, but in any case, I found this issue in SDL_CreateWindow.html:

// Example program:
// Using SDL2 to create an application window
#include "SDL.h"
#include 

In the source, I see #include <stdio.h>, as opposed to #include &lt;stdio.h&gt;. I found this issue very confusing, as I thought that <pre> was supposed to disable parsing the contents at all, but as it turns out <pre> only implies that whitespace is literal. I also thought that <code> both escaped the contents and preserved whitespace, but it turns out not even that was right (how would it recognize </code>?) It looks like there are two options: one, search-and-replace all html entities inside <pre>...</pre>; two, use <script> with plain text type, as mentioned here - I haven't tested it myself, I'm not sure if you have to use it to import, if it affects NoScript, etc.

jep-dev avatar Aug 16 '17 00:08 jep-dev

Hello again - are you still maintaining this project? I've noticed several other errors, such as <\td></td> in tables. I would be happy to make some corrections, but if you're interested, I'd like to discuss some options first.

jep-dev avatar Aug 18 '17 17:08 jep-dev

Sure thing, if you make a pull request, I'll review it and merge it. Just a bit busy to find the problems myself.

On Aug 18, 2017 1:42 PM, "John Petersen" [email protected] wrote:

Hello again - are you still maintaining this project? I've noticed several other errors, such as <\td> in tables. I would be happy to make some corrections, but if you're interested, I'd like to discuss some options first.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Chase-san/SDL2-Docs/issues/1#issuecomment-323416926, or mute the thread https://github.com/notifications/unsubscribe-auth/AACG58Jhrlmyyly2FBNdKKmIVDLGv2Roks5sZc0LgaJpZM4O4Q5z .

Chase-san avatar Aug 18 '17 20:08 Chase-san