This repository was archived by the owner on Sep 30, 2021. It is now read-only.
fix: add logic for replace html escaped symbols in uri string.#2899
Open
Kiolk wants to merge 1 commit intok0shk0sh:developmentfrom
Open
fix: add logic for replace html escaped symbols in uri string.#2899Kiolk wants to merge 1 commit intok0shk0sh:developmentfrom
Kiolk wants to merge 1 commit intok0shk0sh:developmentfrom
Conversation
|
how about oppo a91 |
Author
I don't clear understand you. Can you explain you comment more details? |
|
Looks like a code smell to me! I would suggest editing A pseudo-code is given below. public class LinkParserHelper {
...
static final Map<String, String> escapeSymbols = ...
public static String removeEscapeSymbols(String url) {
for(Map.Entry<String, String> value : escapeSymbols.entrySet()) {
url = url.replace(value.getKey(), value.getValue());
}
return url;
}
}The only problem is the |
|
looks like a code to me
…On Thu, Nov 12, 2020, 13:06 Kaustubh Patange ***@***.***> wrote:
Looks like a code smell to me! I would suggest editing LinkParseHelper
<https://github.com/k0shk0sh/FastHub/blob/development/app/src/main/java/com/fastaccess/provider/scheme/LinkParserHelper.java>
file to include a static hashmap of all escape symbol & a helper function
to remove them all.
A pseudo-code is given below.
public class LinkParserHelper {
...
static final Map<String, String> escapeSymbols = ...
public static String removeEscapeSymbols(String url) {
for(Map.Entry<String, String> value : escapeSymbols.entrySet()) {
url = url.replace(value.getKey(), value.getValue());
}
return url;
}
}
The only problem is the LinkParseHelper class in written in java so the
code must be in java. Anyway, you can then call the static function at
the appropriate call site.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2899 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ3EC5ZDNLYMJYGXIIIEPGTSPPFVBANCNFSM4ML6ZOJQ>
.
|
Repository owner
deleted a comment from
gina23
Nov 15, 2020
KaustubhPatange
added a commit
to KaustubhPatange/FastHub
that referenced
this pull request
Dec 26, 2020
LightDestory
pushed a commit
to LightDestory/FastHub-RE
that referenced
this pull request
Aug 19, 2021
(cherry picked from commit 70802d3)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi folks.
I investigated the problem with issue #2890
The problem happens when extract URL from Html node, where & present as & (by 'net.sourceforge.htmlcleaner:htmlcleaner:2.2'). It normal display in TextView. Uri.parse() not converted this escaped symbol and try open page with it.
I not sure, this solution is best, but it resolves the problem.