{"id":20009789,"url":"https://github.com/plsyssec/mod_markdown","last_synced_at":"2026-06-11T05:31:35.136Z","repository":{"id":143392505,"uuid":"193790722","full_name":"PLSysSec/mod_markdown","owner":"PLSysSec","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-09T23:33:48.000Z","size":963,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-02T01:44:03.711Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PLSysSec.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-25T22:18:31.000Z","updated_at":"2020-02-09T23:33:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"854d15a5-1656-43bf-a79e-a8be7e5312e5","html_url":"https://github.com/PLSysSec/mod_markdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PLSysSec/mod_markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fmod_markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fmod_markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fmod_markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fmod_markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PLSysSec","download_url":"https://codeload.github.com/PLSysSec/mod_markdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLSysSec%2Fmod_markdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34184779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T07:17:05.341Z","updated_at":"2026-06-11T05:31:35.105Z","avatar_url":"https://github.com/PLSysSec.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is a port of `mod_markdown` that sandboxes the underlying markdown library\n(called discount) with RLBox.\n\n1. Install apache2 and apxs (see below in the old readme).\n\n2. Download and build [libmarkdown.so](https://github.com/PLSysSec/libmarkdown).\n\n3. Link [RLBox](https://github.com/shravanrn/rlbox_api) header files in this project:\n\n```\nln -s $(RLBOX_DIR)/rlbox.h\nln -s $(RLBOX_DIR)/RLBox_DynLib.h\n```\n\n2. Assuming you built the shared library in `\u003cLIBMARKDOWN\u003e`:\n\n```\nLIBMARKDOWN=\u003cLIBMARKDOWN\u003e ./build.sh\n```\n\nYou may need to modify build.sh for your machine, depeding on where httpd headers and libtool are installed. You may find the old Makefile useful.\n\nThe build script will general a bunch of warnings we're going to ignore for this research prototype.\n\n3.  Load apache module by modifying httpd.conf:\n\n~~~\nLoadModule markdown_module modules/mod_markdown.so\n~~~\n\nYou need to specify full path:\n~~~\nLoadModule markdown_module /usr/lib/apache2/modules/mod_markdown.so\n~~~\n\nThen add markdown handler to the directory:\n\n~~~\n\u003cDirectory /var/www\u003e\n    AddHandler markdown .md\n    DirectoryIndex index.md\n\u003c/Directory\u003e\n~~~\n\n4. Dump some markdown files in `/var/www`\n\n5. Run apache: `sudo apachectl start`\n\n\n# OLD README\n\nmod_markdown\n============\n\n[![Build Status](https://travis-ci.org/hamano/apache-mod-markdown.svg?branch=master)](https://travis-ci.org/hamano/apache-mod-markdown)\n\nmod_markdown is Markdown filter module for Apache HTTPD Server.\n\n## Dependencies\n\n* The [discount](http://www.pell.portland.or.us/~orc/Code/discount/) library that we sandbox. You want to get it from [here]().\n\nFor Debian/Ubuntu:\n\n~~~\n# apt install build-essential libtool automake autoconf\n# apt install libmarkdown2-dev apache2 apache2-dev\n~~~\n\n## Build\n\n~~~\n% autoreconf -f -i\n% ./configure --with-apxs=\u003cAPXS_PATH\u003e --with-discount=\u003cDISCOUNT_DIR\u003e\n% make\n% make install\n~~~\n\nNote: `\u003cDISCOUNT_DIR\u003e` is the directory that contains the include directory that contains mkdio.h\nProbably you need to specify --with-discount=/usr or --with-discount=/usr/local\n\n## Configuration\nin httpd.conf:\n\n~~~\nLoadModule markdown_module modules/mod_markdown.so\n~~~\n\nYou need to specify full path on debian or ubuntu.\n~~~\nLoadModule markdown_module /usr/lib/apache2/modules/mod_markdown.so\n~~~\n\n~~~\n\u003cLocation /\u003e\n    AddHandler markdown .md\n\n    # If you want to use stylesheet.\n    # MarkdownCss style.css\n    # MarkdownHeaderHtml \"\u003cp\u003eHeader\u003c/p\u003e\"\n    # MarkdownFooterHtml \"\u003cp\u003eFooter\u003c/p\u003e\"\n\u003c/Location\u003e\n~~~\n\nOr:\n\n~~~\n\u003cDirectory /var/www\u003e\n    AddHandler markdown .md\n    DirectoryIndex index.md\n\u003c/Directory\u003e\n~~~\n\n### MarkdownFlags\n\ndefault: MKD_TOC | MKD_AUTOLINK | MKD_FENCEDCODE\n\nFlag | Value | Description\n--- | --- | ---\nMKD_FENCEDCODE   | 0x02000000 | enabled fenced code blocks\nMKD_AUTOLINK     | 0x00004000 | make http://foo.com link even without \u0026lt;\u0026gt;s\nMKD_TOC          | 0x00001000 | do table-of-contents processing\n |  |\nMKD_1_COMPAT     | 0x00002000 | compatibility with MarkdownTest_1.0\nMKD_CDATA        | 0x00000080 | generate code for xml ![CDATA[...]]\nMKD_EMBED       MKD_NOLINKS|MKD_NOIMAGE|MKD_TAGTEXT\nMKD_EXPLICITLIST  | 0x80000000 |        don't combine numbered/bulletted lists\nMKD_EXTRA_FOOTNOTE  | 0x00200000 |      enable markdown extra-style footnotes\nMKD_GITHUBTAGS   | 0x08000000 | allow dash and underscore in element names\nMKD_IDANCHOR     | 0x04000000 | use id= anchors for TOC links\nMKD_LATEX        | 0x40000000 | handle embedded LaTeX escapes\nMKD_NOALPHALIST  | 0x00080000 | forbid alphabetic lists\nMKD_NODIVQUOTE   | 0x00040000 | forbid \u003e%class% blocks\nMKD_NODLDISCOUNT  | 0x00800000 |        disable discount-style definition lists\nMKD_NODLIST      | 0x00100000 | forbid definition lists\nMKD_NO_EXT       | 0x00000040 | don't allow pseudo-protocols\nMKD_NOHEADER     | 0x00010000 | don't process header blocks\nMKD_NOHTML       | 0x00000008 | don't allow raw html through AT ALL\nMKD_NOIMAGE      | 0x00000002 | don't do image processing, block \u0026lt;img\u0026gt;\nMKD_NOLINKS      | 0x00000001 | don't do link processing, block \u0026lt;a\u0026gt; tags\nMKD_NOPANTS      | 0x00000004 | don't run smartypants()\nMKD_NORELAXED    | 0x00000200 | emphasis happens /everywhere/\nMKD_NOSTRIKETHROUGH  | 0x00000800 |     forbid ~~strikethrough~~\nMKD_NOSTYLE      | 0x00400000 | don't extract \u0026lt;style\u0026gt; blocks\nMKD_NOSUPERSCRIPT  | 0x00000100 |       no A^B\nMKD_NOTABLES     | 0x00000400 | disallow tables\nMKD_SAFELINK     | 0x00008000 | paranoid check for link protocol\nMKD_STRICT       | 0x00000010 | disable SUPERSCRIPT, RELAXED_EMPHASIS\nMKD_TABSTOP      | 0x00020000 | expand tabs to 4 spaces\nMKD_TAGTEXT      | 0x00000020 | process text inside an html tag; no\nMKD_URLENCODEDANCHOR  | 0x10000000 | urlencode non-identifier chars instead of replacing with dots\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsyssec%2Fmod_markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplsyssec%2Fmod_markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplsyssec%2Fmod_markdown/lists"}