sdk: Escape network SSID and name when writing profiles.xml

SSIDs can contain ampersands, e.g., "V6 Cafe & Gift Shop". The & and
possibly other special chars need to be escaped when writing
profiles.xml.

Change-Id: Iffef33de22c37d8cb4b5048b92c9ef9c77e18819
This commit is contained in:
Joe Feise
2023-04-07 11:09:53 -05:00
committed by LuK1337
parent 8eb16e554c
commit 4b44a960c1

View File

@@ -295,11 +295,11 @@ public final class Profile implements Parcelable, Comparable {
builder.append(" ");
builder.append(getIdType(mType));
builder.append("=\"");
builder.append(mId);
builder.append(TextUtils.htmlEncode(mId));
builder.append("\" state=\"");
builder.append(mState);
builder.append("\" name=\"");
builder.append(mName);
builder.append(TextUtils.htmlEncode(mName));
builder.append("\"></");
builder.append(itemType);
builder.append(">\n");