Support tables
parent
860159fa00
commit
f831d58c1c
|
@ -13,13 +13,11 @@ Older versions of Tomcat came with default passwords enabled by default. For exa
|
|||
|
||||
**Tomcat 4**
|
||||
|
||||
```
|
||||
| Username | Password | Role |
|
||||
| -------- | -------- | ------------- |
|
||||
| tomcat | tomcat | tomcat |
|
||||
| role1 | tomcat | role1 |
|
||||
| both | tomcat | tomcat, role1 |
|
||||
```
|
||||
|
||||
**Tomcat 5**
|
||||
|
||||
|
|
|
@ -28,10 +28,15 @@ module Redcarpet
|
|||
%Q|<h#{header_level}>#{text}</h#{header_level}><hr>|
|
||||
end
|
||||
|
||||
def table(header, body)
|
||||
%Q|<table class="kb_table" cellpadding="5" cellspacing="2" border="1">#{header}#{body}</table><br>|
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
module Msf
|
||||
module Util
|
||||
module DocumentGenerator
|
||||
|
@ -97,7 +102,14 @@ module Msf
|
|||
# @param kb [String] Additional information to add.
|
||||
# @return [String] HTML document.
|
||||
def md_to_html(md, kb)
|
||||
r = Redcarpet::Markdown.new(Redcarpet::Render::MsfMdHTML, fenced_code_blocks: true, no_intra_emphasis: true, escape_html: true)
|
||||
opts = {
|
||||
fenced_code_blocks: true,
|
||||
no_intra_emphasis: true,
|
||||
escape_html: true,
|
||||
tables: true
|
||||
}
|
||||
|
||||
r = Redcarpet::Markdown.new(Redcarpet::Render::MsfMdHTML, opts)
|
||||
ERB.new(@html_template ||= lambda {
|
||||
html_template = ''
|
||||
path = File.expand_path(File.join(Msf::Config.data_directory, 'markdown_doc', HTML_TEMPLATE))
|
||||
|
|
Loading…
Reference in New Issue