* Sanitizes provided server context: * - removes all characters other than a-z, A-Z, 0-9 and `-` * - returns `other` if nothing is provided or the string is empty after sanitization
(serverContext: string)
| 264 | * - returns `other` if nothing is provided or the string is empty after sanitization |
| 265 | */ |
| 266 | function sanitizeServerContext(serverContext: string): string { |
| 267 | const context = serverContext.replace(/[^a-zA-Z0-9\-]/g, ''); |
| 268 | return context.length > 0 ? context : DEFAULT_SERVER_CONTEXT; |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * Bootstraps an application using provided NgModule and serializes the page content to string. |
no test coverage detected
searching dependent graphs…