Escape themeUri before rewriting CustomLayout HTML. (#15309)

Change-Id: I192691ac02bf3a98df1424dead5e4fd6385e395d