File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
AndroidSDK/src/com/leanplum Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ public String stringNamed(String name) {
226226 }
227227 }
228228
229- private String fillTemplate (String value ) {
229+ public String fillTemplate (String value ) {
230230 if (contextualValues == null || value == null || !value .contains ("##" )) {
231231 return value ;
232232 }
Original file line number Diff line number Diff line change @@ -170,8 +170,14 @@ private static String getTemplate(ActionContext context) {
170170 try {
171171 htmlString = (htmlTemplate .replace ("##Vars##" ,
172172 ActionContext .mapToJsonObject (htmlArgs ).toString ()));
173+ try {
174+ htmlString = context .fillTemplate (htmlString );
175+ } catch (Throwable ignored ) {
176+ }
173177 } catch (JSONException e ) {
174178 Log .e ("Leanplum" , "Cannot convert map of arguments to JSON object." );
179+ } catch (Throwable t ) {
180+ Log .e ("Leanplum" , "Cannot get html template." , t );
175181 }
176182 return htmlString .replace ("\\ /" , "/" );
177183 }
You can’t perform that action at this time.
0 commit comments