mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Merge pull request #397 from kmark/title-decode-fix
Decode HTML entities in titles
This commit is contained in:
commit
5561322512
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.google.zxing.client.android.result.supplement;
|
||||
|
||||
import android.text.Html;
|
||||
import android.widget.TextView;
|
||||
import com.google.zxing.client.android.HttpHelper;
|
||||
import com.google.zxing.client.android.history.HistoryManager;
|
||||
|
@ -56,6 +57,7 @@ final class TitleRetriever extends SupplementalInfoRetriever {
|
|||
if (m.find()) {
|
||||
String title = m.group(1);
|
||||
if (title != null && !title.isEmpty()) {
|
||||
title = Html.fromHtml(title).toString();
|
||||
if (title.length() > MAX_TITLE_LEN) {
|
||||
title = title.substring(0, MAX_TITLE_LEN) + "...";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue