Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
  • Loading branch information
mathetake committed Nov 26, 2024
1 parent 6c1314d commit 60d574c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/common/common/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,12 +589,12 @@ void StringUtil::escapeToOstream(std::ostream& os, absl::string_view view) {
std::string StringUtil::sanitizeInvalidHostname(const absl::string_view source) {
std::string ret_str = std::string(source);
bool sanitized = false;
for (char i : ret_str) {
for (char& i : ret_str) {
if (absl::ascii_isalnum(i) || i == '.' || i == '-' || i == '_') {
continue;
}
sanitized = true;
ret_str[i] = '_';
i = '_';
}

if (sanitized) {
Expand Down

0 comments on commit 60d574c

Please sign in to comment.