pull/91/head
Hieromon Ikasamo 6 years ago
parent 2bce6a912f
commit 02c157048c
  1. 15
      src/AutoConnectAux.cpp

@ -2,8 +2,8 @@
* Implementation of AutoConnectAux class. * Implementation of AutoConnectAux class.
* @file AutoConnectAuxBasisImpl.h * @file AutoConnectAuxBasisImpl.h
* @author hieromon@gmail.com * @author hieromon@gmail.com
* @version 0.9.9 * @version 0.9.10
* @date 2019-05-25 * @date 2019-06-12
* @copyright MIT license. * @copyright MIT license.
*/ */
#include <algorithm> #include <algorithm>
@ -340,7 +340,16 @@ const String AutoConnectAux::_injectMenu(PageArgument& args) {
const String AutoConnectAux::_indicateUri(PageArgument& args) { const String AutoConnectAux::_indicateUri(PageArgument& args) {
AC_UNUSED(args); AC_UNUSED(args);
String lastUri = _uriStr; String lastUri = _uriStr;
lastUri.replace("/", "&#47;"); // The following code contains adding and trimming a blank that is
// wasteful for this function. It exists for avoiding the bug of
// WString::replace of ESP8266 arduino core 2.5.2.
// https://github.com/esp8266/Arduino/issues/6192
String reps = "/";
String replacement = "&#47;";
if (lastUri.length() == reps.length() + replacement.length())
lastUri += " ";
lastUri.replace(reps, replacement);
lastUri.trim();
return lastUri; return lastUri;
} }

Loading…
Cancel
Save