diff --git a/themes/default/css/style.css b/themes/default/css/style.css index f0ff34f..bb97676 100644 --- a/themes/default/css/style.css +++ b/themes/default/css/style.css @@ -2126,3 +2126,10 @@ div.ci_checkin { .user-color { width:160px;height:20px; } .badges { float:left;padding-left:25px;width:275px;} .badge img { margin:5px; } + +.allowed-html { + font-weight: normal; + font-size: 10px; + line-height: 12px; + color: #a1a1a1; +} diff --git a/themes/default/views/blocks/main_reports.php b/themes/default/views/blocks/main_reports.php index a1895ae..c9ba452 100644 --- a/themes/default/views/blocks/main_reports.php +++ b/themes/default/views/blocks/main_reports.php @@ -19,14 +19,14 @@ foreach ($incidents as $incident) { $incident_id = $incident->id; - $incident_title = text::limit_chars(strip_tags($incident->incident_title), 40, '...', True); + $incident_title = text::limit_chars(html::escape($incident->incident_title), 40, '...', True); $incident_date = $incident->incident_date; $incident_date = date('M j Y', strtotime($incident->incident_date)); $incident_location = $incident->location->location_name; ?> - - + + "; ?> +"; ?> > - <?php echo $feed_title; ?> - + <?php echo html::specialchars($feed_title); ?> + @@ -15,14 +15,14 @@ foreach ($items as $item) {?> - <?php echo $item['title']; ?> + <?php echo html::specialchars($item['title']); ?>
- +
"; ?> +"; ?> > - <?php echo $feed_title; ?> + <?php echo html::specialchars($feed_title); ?> - + Ushahidi Platform @@ -13,9 +13,9 @@ - <?php echo htmlspecialchars($item['title']); ?> + <?php echo html::specialchars($item['title']); ?> - ]]> + ]]> @@ -24,7 +24,7 @@ - + diff --git a/themes/default/views/header.php b/themes/default/views/header.php index 53e19ad..2e9c472 100644 --- a/themes/default/views/header.php +++ b/themes/default/views/header.php @@ -89,7 +89,7 @@ -
<?php echo htmlentities(Kohana::lang('ui_main.rss'), ENT_QUOTES); ?>
+
<?php echo html::escape(Kohana::lang('ui_main.rss')); ?>
diff --git a/themes/default/views/main/layout.php b/themes/default/views/main/layout.php index bbc2a58..8147328 100755 --- a/themes/default/views/main/layout.php +++ b/themes/default/views/main/layout.php @@ -49,12 +49,12 @@ $category_info) { - $category_title = htmlentities($category_info[0], ENT_QUOTES, "UTF-8"); + $category_title = html::escape($category_info[0]); $category_color = $category_info[1]; $category_image = ($category_info[2] != NULL) ? url::convert_uploaded_to_abs($category_info[2]) : NULL; - $category_description = htmlentities(Category_Lang_Model::category_description($category), ENT_QUOTES, "UTF-8"); + $category_description = html::escape(Category_Lang_Model::category_description($category)); $color_css = 'class="category-icon swatch" style="background-color:#'.$category_color.'"'; if ($category_info[2] != NULL) @@ -78,12 +78,12 @@ echo '
    '; foreach ($category_info[3] as $child => $child_info) { - $child_title = htmlentities($child_info[0], ENT_QUOTES, "UTF-8"); + $child_title = html::escape($child_info[0]); $child_color = $child_info[1]; $child_image = ($child_info[2] != NULL) ? url::convert_uploaded_to_abs($child_info[2]) : NULL; - $child_description = htmlentities(Category_Lang_Model::category_description($child), ENT_QUOTES, "UTF-8"); + $child_description = html::escape(Category_Lang_Model::category_description($child)); $color_css = 'class="category-icon swatch" style="background-color:#'.$child_color.'"'; if ($child_info[2] != NULL) diff --git a/themes/default/views/page.php b/themes/default/views/page.php index f474e0d..c78d642 100644 --- a/themes/default/views/page.php +++ b/themes/default/views/page.php @@ -1,9 +1,9 @@
    -

    +

    diff --git a/themes/default/views/profile/user.php b/themes/default/views/profile/user.php index adeadba..b1df0ce 100644 --- a/themes/default/views/profile/user.php +++ b/themes/default/views/profile/user.php @@ -24,7 +24,7 @@

    -
    incident_title); ?>
    +
    incident_title); ?>

    incident_date)); ?>

    location->location_name); ?>

    diff --git a/themes/default/views/reports/comments.php b/themes/default/views/reports/comments.php index 07980b6..5d9a0ca 100644 --- a/themes/default/views/reports/comments.php +++ b/themes/default/views/reports/comments.php @@ -8,10 +8,10 @@
    - comment_author); ?> (comment_date)); ?>) + comment_author); ?> (comment_date)); ?>)
    -
    comment_description); ?>
    +
    comment_description); ?>
    diff --git a/themes/default/views/reports/detail.php b/themes/default/views/reports/detail.php index 0145e07..462ebe6 100755 --- a/themes/default/views/reports/detail.php +++ b/themes/default/views/reports/detail.php @@ -14,7 +14,7 @@ ?>

    '; foreach ($incident_photos as $photo) { - echo ''.htmlentities($incident_title, ENT_QUOTES, '; + echo ''.html::escape($incident_title).' '; }; echo '

    '; } @@ -103,7 +103,7 @@
    - +
    diff --git a/themes/default/views/reports/list.php b/themes/default/views/reports/list.php index abdd731..2ee0f25 100644 --- a/themes/default/views/reports/list.php +++ b/themes/default/views/reports/list.php @@ -44,14 +44,14 @@ foreach ($incidents as $incident) { $incident_id = $incident->incident_id; - $incident_title = strip_tags($incident->incident_title); - $incident_description = strip_tags($incident->incident_description); + $incident_title = html::strip_tags($incident->incident_title); + $incident_description = html::strip_tags($incident->incident_description); $incident_url = Incident_Model::get_url($incident_id); //$incident_category = $incident->incident_category; // Trim to 150 characters without cutting words // XXX: Perhaps delcare 150 as constant - $incident_description = text::limit_chars(strip_tags($incident_description), 140, "...", true); + $incident_description = text::limit_chars(html::strip_tags($incident_description), 140, "...", true); $incident_date = date('H:i M d, Y', strtotime($incident->incident_date)); //$incident_time = date('H:i', strtotime($incident->incident_date)); $location_id = $incident->location_id; @@ -88,7 +88,7 @@

    - <?php echo htmlentities($incident_title, ENT_QUOTES, " src="" /> + <?php echo html::escape($incident_title); ?>

    @@ -126,7 +126,7 @@

    - + " class="r_comments"> diff --git a/themes/default/views/reports/submit.php b/themes/default/views/reports/submit.php index be16ec8..3656923 100755 --- a/themes/default/views/reports/submit.php +++ b/themes/default/views/reports/submit.php @@ -50,6 +50,7 @@

    *

    +