Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hex problem with Html code #205

Open
KcNirvana opened this issue Jan 30, 2018 · 2 comments
Open

Hex problem with Html code #205

KcNirvana opened this issue Jan 30, 2018 · 2 comments
Labels

Comments

@KcNirvana
Copy link
Contributor

KcNirvana commented Jan 30, 2018

Hello,
I have a string with html code embedded which is supposed to be a font color.
When I use the hex config it converts to html and the color doesn't reproduce.

Original string:
<string name="status_bar_network_flow_exceed_content">Hoje: %1$s | Dados excedidos: &lt;font color=%2$s&gt;%3$s&lt;/font&gt;</string>

String after hex
<string name="status_bar_network_flow_exceed_content">Hoje: %1$s | Dados excedidos: <font color="%2$s">%3$s</font></string>

That variable is supposed to be the red color (#ff0000) and after hex the color doesn't appear.
I decompile both apks to see strings.xml with apktool 2.3.1

Can you check if anything is wrong or I should use another content in string?
Thank you...

Apkwithhex.zip
originalapk.zip

@BurgerZ
Copy link
Owner

BurgerZ commented Jan 31, 2018

Hi,

The problem is not in transforming &lt; to < or &gt; to >, the problem and the main issue is that jbart do all the stuff in the right way, but only for strings without parameters:

<string name="status_bar_network_flow_exceed_content">Hoje: %1$s | Dados excedidos: <font color="red">String to be red</font></string>
In this case string "String to be red" will be red, because it's a raw string (not the string format argument, such as %3$s).

I need more time to research this stuff in aapt/aapt2 source code.

@BurgerZ BurgerZ added the bug label Jan 31, 2018
@KcNirvana
Copy link
Contributor Author

Hello,
Alright.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants