Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hubzilla
core
Commits
e97dd48b
Commit
e97dd48b
authored
Mar 20, 2017
by
Zot
Committed by
Mario
Mar 29, 2017
Browse files
even more fine tuning of the markdown purifier - especially when used with the wiki
parent
5915f319
Changes
4
Hide whitespace changes
Inline
Side-by-side
Zotlabs/Lib/MarkdownSoap.php
View file @
e97dd48b
...
...
@@ -81,7 +81,7 @@ class MarkdownSoap {
$s
=
str_replace
(
"
\t
"
,
' '
,
$s
);
$s
=
str_replace
(
' '
,
' '
,
$s
);
$s
=
purify_html
(
$s
);
$s
=
str_replace
(
' '
,
" "
,
$s
);
$s
=
str_replace
(
[
' '
,
mb_convert_encoding
(
' '
,
'UTF-8'
,
'HTML-ENTITIES'
)],
[
' '
,
' '
]
,
$s
);
$s
=
str_replace
([
'<br>'
,
'<br />'
],[
"
\n
"
,
"
\n
"
],
$s
);
return
$s
;
}
...
...
Zotlabs/Lib/NativeWikiPage.php
View file @
e97dd48b
...
...
@@ -156,7 +156,7 @@ class NativeWikiPage {
$content
=
$item
[
'body'
];
return
[
'content'
=>
json_encode
(
$content
),
'content'
=>
$content
,
'mimeType'
=>
$w
[
'mimeType'
],
'message'
=>
''
,
'success'
=>
true
...
...
Zotlabs/Module/Wiki.php
View file @
e97dd48b
...
...
@@ -256,6 +256,7 @@ class Wiki extends \Zotlabs\Web\Controller {
goaway
(
'/'
.
argv
(
0
)
.
'/'
.
argv
(
1
)
.
'/'
.
$wikiUrlName
.
'/'
.
$pageUrlName
);
}
$wikiModalID
=
random_string
(
3
);
$wikiModal
=
replace_macros
(
get_markup_template
(
'generic_modal.tpl'
),
array
(
...
...
view/tpl/wiki.tpl
View file @
e97dd48b
...
...
@@ -104,7 +104,7 @@
window
.
wiki_resource_id
=
'
{
{
$resource_id
}
}
'
;
window
.
wiki_page_name
=
'
{
{
$page
}
}
'
;
// window.wiki_page_content = "{
{
$content
|
escape
:
'javascript'
}
}
"
;
window.wiki_page_content = {
{
$content
}
};
window.wiki_page_content =
'
{
{
$content
|
escape
:
'quotes'
}
}
'
;
window.wiki_page_commit = '{
{
$commit
}
}';
$(
"
#
generic
-
modal
-
ok
-
{
{
$wikiModalID
}
}
"
).removeClass('btn-primary');
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment