Skip to content

Commit

Permalink
Merge pull request zxing#397 from kmark/title-decode-fix
Browse files Browse the repository at this point in the history
Decode HTML entities in titles
  • Loading branch information
srowen committed May 23, 2015
2 parents faee672 + 955a9e8 commit 5561322
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,6 +57,7 @@ void retrieveSupplementalInfo() {
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) + "...";
}
Expand Down

0 comments on commit 5561322

Please sign in to comment.