* For email documents, all URL macros are disallowed by default. * @return {Array |undefined} The allowlist of substitutable AMP variables * @private
()
| 323 | * @private |
| 324 | */ |
| 325 | getUrlMacroAllowlist_() { |
| 326 | if (this.variableAllowlist_) { |
| 327 | return this.variableAllowlist_; |
| 328 | } |
| 329 | |
| 330 | // Disallow all URL macros for AMP4Email format documents. |
| 331 | if (this.ampdoc.isSingleDoc()) { |
| 332 | const doc = /** @type {!Document} */ (this.ampdoc.getRootNode()); |
| 333 | if (isAmp4Email(doc)) { |
| 334 | /** |
| 335 | * The allowlist of variables allowed for variable substitution. |
| 336 | * @private {?Array<string>} |
| 337 | */ |
| 338 | this.variableAllowlist_ = ['']; |
| 339 | return this.variableAllowlist_; |
| 340 | } |
| 341 | } |
| 342 | } |
| 343 | } |
no test coverage detected