viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

tweak to last to fix media urls with +, a=chris

Chris Pollett [2020-06-25 18:Jun:th]
tweak to last to fix media urls with +, a=chris
Filename
src/views/elements/WikiElement.php
diff --git a/src/views/elements/WikiElement.php b/src/views/elements/WikiElement.php
index f786daa62..28b39e45d 100644
--- a/src/views/elements/WikiElement.php
+++ b/src/views/elements/WikiElement.php
@@ -269,11 +269,13 @@ class WikiElement extends Element implements CrawlConstants
                                 elt('next-link').style.display = 'none';
                             }
                             let old_src = source.getAttribute('src');
+                            old_src = old_src.split("+").join("%20");
                             let old_resource =
                                 next_resources[current_resource_index - 1];
                             source.setAttribute('src', old_src.replace(
-                                old_resource,
-                                next_resources[current_resource_index]));
+                                encodeURIComponent(old_resource),
+                                encodeURIComponent(
+                                    next_resources[current_resource_index])));
                             page_path_elt = elt('media-path');
                             page_path_elt.options[
                                 page_path_elt.selectedIndex].text =
ViewGit