php-markdown
php-markdown copied to clipboard
How to convert newline to br tag
- Same the GithubMarkdown, when we typing enter, it's preview start new line.
But with michelf/php-markdown, we need type twice enter to start new line.
Please help me !
Note: I have setup no_markup = true; (So I cant using
tag in Markdown) - Please solve this bug:
When user input:
[I'm an inline-style link](javascript:alert('xss'))
It allow browser click and alert !
The Markdown syntax for a line break is to add two spaces at the end of a line. Github is twisting the rules when rendering comments, but not when rendering .md files. I'd be willing to accept a patch that implements automatic line breaks as an optional feature though.
PHP Markdown is not a filter for malicious content. Please run an additional filter on the HTML output if you need to protect against scripting attacks. https://michelf.ca/blog/2010/markdown-and-xss/
Github style line breaks would be a nice option, since that's the only reason why I need to switch to a different parser. Maybe I have time to program a patch for it.
Even two additional lines with two spaces at each line didn't place any br tags. How to force it?