jBART icon indicating copy to clipboard operation
jBART copied to clipboard

Hex problem with Html code

Open KcNirvana opened this issue 8 years ago • 2 comments

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

KcNirvana avatar Jan 30 '18 00:01 KcNirvana

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 avatar Jan 31 '18 05:01 BurgerZ

Hello, Alright. Thank you

KcNirvana avatar Jan 31 '18 15:01 KcNirvana