aboutsummaryrefslogtreecommitdiffstats
path: root/include/markdown.php
Commit message (Collapse)AuthorAgeFilesLines
* markdown: Don't link URLs in code blocks.Harald Eilertsen2024-09-301-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing a content throught the `markdown_to_bb` function to convert any markdown in the content, any recognized URLs in the content would be converted to BBCode links as a post processing step after the main conversion. After commit a1ccacb825edac6ae36e5db4f62ebfe7aeaebe9f this did no longer consider content within code blocks, and would thus convert them as to BBCode links. Example: The following content [code] example url: https://example.com [/code] Would be converted to [code] example url: [url=https://example.com]https://example.com[/url] [/code] Prior to commit a1ccacb825edac6ae36e5db4f62ebfe7aeaebe9f, code blocks would be protected, so this would not happen. This patch removes the post processing step for converting plain URLs to links completely from this routine. This functionality is in any case covered in the actual BBCode parser where it belongs. This will have some other side effects as well, such as images and links created using Markdown, will not be converted to [zmg] or [zrl] tags where that would be done automatically before. If you intend to use a [zrl] or [zmg] tag, you now need to do so explicitly.
* adjust encrypted content representation and also add it to bb_to_markdownMario2024-03-151-2/+21
|
* fix php warningsMario2022-10-121-1/+4
|
* missing use statementMario2021-06-051-0/+1
|
* league/html-to-markdown suports tables nowMario2021-06-051-72/+2
|
* get devHilmar R2021-03-011-3/+6
|
* Fix wrong URL detection with Markdown support enabledMax Kostikov2020-01-121-6/+6
|
* Better BBcode to Markdown conversionMax Kostikov2019-11-081-2/+5
|
* Better spoiler BBcode tag conversion to MarkdownMax Kostikov2019-08-231-1/+1
|
* Fix spoiler displaying while convert BBcode to markdownMax Kostikov2019-08-221-0/+3
|
* fix #1374Mario Vavti2019-05-241-0/+4
|
* Remove scale_external_images()Max Kostikov2018-12-171-2/+0
|
* fix markdown testsMario Vavti2018-10-301-1/+2
|
* really fix html2markdown() - when using environment, we must set the defaultsMario Vavti2018-10-301-5/+13
|
* fix html2markdown() and re-enable previously failing testsMario Vavti2018-10-301-9/+2
|
* fix phpunit error with html2markdown test and temporary disable failing ↵git-marijus2018-10-131-3/+4
| | | | markdown test in connection with **bold** and _italic_ (it is not clear why they fail and the code appears to work as expected)
* another try to fix Fix PHP Warning: DOMDocument::loadHTML(): ↵Mario Vavti2018-09-221-1/+4
| | | | htmlParseEntityRef: no name in Entity
* Revert "Fix PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no ↵Mario2018-09-221-2/+0
| | | | | name in Entity" This reverts commit 184928204a264b231814b46ef294ef185dc0cdae
* Fix PHP Warning: DOMDocument::loadHTML(): htmlParseEntityRef: no name in EntityMario Vavti2018-09-121-0/+2
|
* html-to-markdown adds a backslash infront of a hash after each new line - ↵Mario Vavti2018-08-291-1/+4
| | | | manualy remove those
* issue with mdpost addon and archive.org links which contain a full url as a ↵zotlabs2018-08-131-2/+2
| | | | path/query component
* add table support to markdownzotlabs2018-08-121-2/+79
|
* revert debug comment from the last commitMario Vavti2018-08-091-1/+1
|
* fix zid leaking to nonzot sites if markdown is enabledMario Vavti2018-08-091-3/+41
|
* hubzilla issue #1166zotlabs2018-05-091-2/+2
|
* new markdown lib seems to handle < and > correct. remove the workaraound.Mario Vavti2018-03-231-2/+2
|
* change to bbcode calling parameters: important: will require pulling addons;zotlabs2017-11-231-1/+1
| | | | also some extra checking of server headers in upload functions
* hubzilla issue #901 - unicode characters in urls tripping up url regexes - ↵zotlabs2017-11-091-2/+2
| | | | these regexes have been modified to accept unicode "letters" which may preclude emojis and control sequences and symbols in url links; but should suffice for most legal URLs containing language context "text" glyphs.
* :bulb: Improving Doxygen documentation.Klaus Weidenbach2017-11-031-24/+47
| | | | | Fix some Doxygen parsing errors. Improve hooks documentation.
* bring back the markdown post feature (after investing some effort to make it ↵zotlabs2017-10-221-4/+7
| | | | work)
* some bb-to-markdown issueszotlabs2017-08-031-5/+2
|
* add options flag to bb_to_markdown so we can distinguish between diaspora ↵zotlabs2017-07-301-2/+4
| | | | | | use and other use and therefore filter and adjust content selectively
* improve the formatting of shares when converting from bbcode to markdownzotlabs2017-07-261-0/+69
|
* Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_mergezotlabs2017-06-071-1/+0
|\
| * re-arrange a few functionszotlabs2017-06-071-67/+0
| |
* | re-arrange a few functionszotlabs2017-05-301-67/+0
| |
* | bring back html2markdown which went away in the mergezotlabs2017-05-301-0/+30
| |
* | Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_mergezotlabs2017-05-301-5/+4
|\|
| * Don't drop PHP5 support yet.Klaus Weidenbach2017-05-271-1/+1
| | | | | | | | Scalar Type Hints and Return Type Declarations were introduced in PHP7.
| * :hammer::white_check_mark: Add html2markdown unit tests.Klaus Weidenbach2017-05-271-9/+41
| | | | | | | | | | | | A tiny refactoring to make HTML 2 markdown conversion testable. Add some unit tests to check the behavior of the now used HTML2Markdown library. There are some differences compared to the old pixel418/markdownify library.
* | Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_mergezotlabs2017-05-231-4/+6
|\|
| * Replace Mardownify library with html-to-markdown library.Klaus Weidenbach2017-05-231-4/+3
| |
| * handle mastodon urls in markdown/bbcode conversionzotlabs2017-05-101-2/+2
| |
* | handle mastodon urls in markdown/bbcode conversionzotlabs2017-05-081-2/+2
| |
* | finish the red conversion of the markdown utilities considering their ↵zotlabs2017-05-021-0/+52
| | | | | | | | relation to protocol plugins.
* | move all the diaspora content hacks to the diaspora pluginzotlabs2017-03-081-408/+9
| |
* | DCV stuffzotlabs2017-03-071-20/+6
|/
* :arrow_up: :hammer: Upgrade Markdownify library.Klaus Weidenbach2017-03-051-6/+4
| | | | | | | | The current version 2.0.0 (alpha) throws deprecated warning with PHP7.1 and PHPUnit. Upgrade the HTML to Markdown converter for PHP to the current Markdownify 2.2.1. Used composer to manage this library.
* :arrow_up: :hammer: Upgrade PHP Markdown library.Klaus Weidenbach2017-02-271-20/+21
| | | | | | The current version throws deprecated warning with PHP7.1 and PHPUnit. Upgrade the Markdown library to the current PHP Markdown Lib 1.7.0. Used composer to manage this library.
* remove per-page login css (home, login); add support for alternative ↵zotlabs2017-02-051-1/+36
| | | | markdown mention format