Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
a9ca3846
Commit
a9ca3846
authored
Mar 04, 2009
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More xss fixes
parent
b5912c5e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
htdocs/artefact/blog/lib.php
htdocs/artefact/blog/lib.php
+7
-6
htdocs/artefact/blog/theme/default/render/blogpost_renderfull.tpl
...rtefact/blog/theme/default/render/blogpost_renderfull.tpl
+1
-1
htdocs/artefact/file/blocktype/image/lib.php
htdocs/artefact/file/blocktype/image/lib.php
+1
-1
htdocs/artefact/resume/theme/default/fragments/personalinformation.tpl
...ct/resume/theme/default/fragments/personalinformation.tpl
+2
-2
htdocs/theme/default/templates/view/artefact.tpl
htdocs/theme/default/templates/view/artefact.tpl
+1
-1
No files found.
htdocs/artefact/blog/lib.php
View file @
a9ca3846
...
...
@@ -235,10 +235,10 @@ class ArtefactTypeBlog extends ArtefactType {
if
(
isset
(
$options
[
'viewid'
]))
{
$smarty
->
assign
(
'artefacttitle'
,
'<a href="'
.
get_config
(
'wwwroot'
)
.
'view/artefact.php?artefact='
.
$this
->
get
(
'id'
)
.
'&view='
.
$options
[
'viewid'
]
.
'">'
.
$this
->
get
(
'title'
)
.
'</a>'
);
.
'">'
.
hsc
(
$this
->
get
(
'title'
)
)
.
'</a>'
);
}
else
{
$smarty
->
assign
(
'artefacttitle'
,
$this
->
get
(
'title'
));
$smarty
->
assign
(
'artefacttitle'
,
hsc
(
$this
->
get
(
'title'
))
)
;
}
$smarty
->
assign
(
'blockid'
,
$blockid
);
...
...
@@ -246,7 +246,7 @@ class ArtefactTypeBlog extends ArtefactType {
$smarty
->
assign
(
'enc_id'
,
json_encode
(
$this
->
id
));
$smarty
->
assign
(
'limit'
,
self
::
pagination
);
$smarty
->
assign
(
'loading_img'
,
theme_get_url
(
'images/loading.gif'
));
$smarty
->
assign
(
'description'
,
$this
->
get
(
'description'
));
$smarty
->
assign
(
'description'
,
clean_html
(
$this
->
get
(
'description'
))
)
;
// Remove unnecessary options for blog posts
unset
(
$options
[
'hidetitle'
]);
...
...
@@ -469,15 +469,15 @@ class ArtefactTypeBlogPost extends ArtefactType {
if
(
isset
(
$options
[
'viewid'
]))
{
$smarty
->
assign
(
'artefacttitle'
,
'<a href="'
.
get_config
(
'wwwroot'
)
.
'view/artefact.php?artefact='
.
$this
->
get
(
'id'
)
.
'&view='
.
$options
[
'viewid'
]
.
'">'
.
$this
->
get
(
'title'
)
.
'</a>'
);
.
'">'
.
hsc
(
$this
->
get
(
'title'
)
)
.
'</a>'
);
}
else
{
$smarty
->
assign
(
'artefacttitle'
,
$this
->
get
(
'title'
));
$smarty
->
assign
(
'artefacttitle'
,
hsc
(
$this
->
get
(
'title'
))
)
;
}
}
// We need to make sure that the images in the post have the right viewid associated with them
$postcontent
=
$this
->
get
(
'description'
);
$postcontent
=
clean_html
(
$this
->
get
(
'description'
)
)
;
if
(
isset
(
$options
[
'viewid'
]))
{
safe_require
(
'artefact'
,
'file'
);
$postcontent
=
ArtefactTypeFolder
::
append_view_url
(
$postcontent
,
$options
[
'viewid'
]);
...
...
@@ -612,6 +612,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
foreach
(
$result
as
&
$post
)
{
$post
->
ctime
=
format_date
(
$post
->
ctime
,
'strftimedaydatetime'
);
$post
->
mtime
=
format_date
(
$post
->
mtime
);
$post
->
description
=
clean_html
(
$post
->
description
);
}
}
...
...
htdocs/artefact/blog/theme/default/render/blogpost_renderfull.tpl
View file @
a9ca3846
...
...
@@ -11,7 +11,7 @@
{
foreach
from
=
$attachments
item
=
item
}
<tr
class=
"r
{
cycle
values
=
1
,
0
}
"
>
<td
style=
"width: 22px;"
><img
src=
"
{
$item
->
iconpath
|
escape
}
"
alt=
""
></td>
<td><a
href=
"
{
$item
->
viewpath
|
escape
}
"
>
{
$item
->
title
}
</a>
(
{
$item
->
size
}
) -
<strong><a
href=
"
{
$item
->
downloadpath
|
escape
}
"
>
{
str
tag
=
Download
section
=
artefact
.
file
}
</a></strong>
<td><a
href=
"
{
$item
->
viewpath
|
escape
}
"
>
{
$item
->
title
|
escape
}
</a>
(
{
$item
->
size
}
) -
<strong><a
href=
"
{
$item
->
downloadpath
|
escape
}
"
>
{
str
tag
=
Download
section
=
artefact
.
file
}
</a></strong>
<br><strong>
{
$item
->
description
|
escape
}
</strong></td>
</tr>
{/
foreach
}
...
...
htdocs/artefact/file/blocktype/image/lib.php
View file @
a9ca3846
...
...
@@ -74,7 +74,7 @@ class PluginBlocktypeImage extends PluginBlocktype {
$description
=
(
is_a
(
$image
,
'ArtefacttypeImage'
))
?
$image
->
get
(
'description'
)
:
$image
->
get
(
'title'
);
if
(
!
empty
(
$configdata
[
'showdescription'
])
&&
$description
)
{
$result
.
=
'<p>'
.
$description
.
'</p>'
;
$result
.
=
'<p>'
.
hsc
(
$description
)
.
'</p>'
;
}
$result
.
=
'</div>'
;
}
...
...
htdocs/artefact/resume/theme/default/fragments/personalinformation.tpl
View file @
a9ca3846
<table>
{
foreach
from
=
$fields
key
=
'field'
item
=
'value'
}
<tr>
<td>
{
$field
}
</td>
<td>
{
$value
}
</td>
<td>
{
$field
|
escape
}
</td>
<td>
{
$value
|
escape
}
</td>
</tr>
{/
foreach
}
</table>
htdocs/theme/default/templates/view/artefact.tpl
View file @
a9ca3846
...
...
@@ -5,7 +5,7 @@
<h2>
<a
href=
"
{
$WWWROOT
}
view/view.php?id=
{
$viewid
}
"
>
{
$viewtitle
|
escape
}
</a>
{
if
$ownername
}
{
str
tag
=
by
section
=
view
}
<a
href=
"
{
$WWWROOT
}{
$ownerlink
}
"
>
{
$ownername
|
escape
}
</a>
{/
if
}{
foreach
from
=
$artefactpath
item
=
a
}
:
{
if
$a.url
}
<a
href=
"
{
$a.url
}
"
>
{/
if
}{
$a.title
}{
if
$a.url
}
</a>
{/
if
}
{
if
$a.url
}
<a
href=
"
{
$a.url
}
"
>
{/
if
}{
$a.title
|
escape
}{
if
$a.url
}
</a>
{/
if
}
{/
foreach
}
</h2>
...
...
Write
Preview
Markdown
is supported
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