Merge lp:~guiona/bilboplanet/660663 into lp:~greg-theclimber/bilboplanet/testing

Proposed by Guiona
Status: Merged
Merged at revision: 152
Proposed branch: lp:~guiona/bilboplanet/660663
Merge into: lp:~greg-theclimber/bilboplanet/testing
Diff against target: 24 lines (+8/-5)
1 file modified
inc/fonctions.php (+8/-5)
To merge this branch: bzr merge lp:~guiona/bilboplanet/660663
Reviewer Review Type Date Requested Status
Gregoire de Hemptinne Pending
Review via email: mp+43170@code.launchpad.net

Description of the change

Done

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'inc/fonctions.php'
2--- inc/fonctions.php 2010-12-03 08:08:25 +0000
3+++ inc/fonctions.php 2010-12-09 08:49:52 +0000
4@@ -707,12 +707,15 @@
5 #---------------------------------------------------#
6 function html_encode_code_tags ($html) {
7
8- preg_match_all("/(<code>)(.*?)(<\/code>)/", $html, $matches, PREG_SET_ORDER);
9-
10- foreach ($matches as $val) {
11- $res = str_replace($val[0], "<code>".htmlentities(stripslashes($val[2]), ENT_QUOTES, 'UTF-8')."</code>", $html);
12+ if (preg_match_all("/(<code>)(.*?)(<\/code>)/", $html, $matches, PREG_SET_ORDER)) {
13+
14+ foreach ($matches as $val) {
15+ $res = str_replace($val[0], "<code>".htmlentities(stripslashes($val[2]), ENT_QUOTES, 'UTF-8')."</code>", $html);
16+ }
17+
18+ return $res;
19 }
20
21- return $res;
22+ return $html;
23 }
24 ?>

Subscribers

People subscribed via source and target branches

to all changes: