Skip to content

Disallowed html tags in help docs #1102

@isra-fel

Description

@isra-fel

Description

In some cases, we will generate help documents like this:

  - `[GalleryApplicationVersionName <String>]`: The name of the gallery Application Version to be created. Needs to follow semantic version name pattern: The allowed characters are digit and period. Digits must be within the range of a 32-bit integer. Format: <MajorVersion>.<MinorVersion>.<Patch>

### -Id
Role Definition Unique Id(Format is <databaseName>.<roleName>).

The <MajorVersion>, <MinorVersion>, <Patch>, <databaseName>, <roleName> are placeholders. But they are recognized as HTML tags (because of the <>). So the build of docs is affected.

Possible solution

We can use a tool like https://www.npmjs.com/package/sanitize-markdown (not verified) and define an allowed list of HTML tags. When it detects any invalid HTML tag, we transforms it to another safe format.

Possible formats:

<Example> -> {Example}
<Example> -> `<Example>`

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv4Need to be done in autorest.powershell V4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions