Skip to content

Commit

Permalink
chore(docs): add escape_html doc (hexojs#1576)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin authored Dec 17, 2020
1 parent b09526d commit dd8c202
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,21 @@ Truncates text after certain `length`. Default is 30 characters.
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## Templates

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/ko/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,21 @@ See [Rendering](https://hexo.io/ko/api/rendering) for more details.
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## 템플릿

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/pt-br/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,21 @@ Omite o texto após um certo valor de `length`. O valor padrão de `length` é 3
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## Templates

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/ru/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,21 @@ See [Rendering](https://hexo.io/ru/api/rendering) for more details.
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## Шаблоны

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/th/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,21 @@ See [Rendering](https://hexo.io/th/api/rendering) for more details.
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## Templates

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/zh-cn/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,21 @@ See [Rendering](https://hexo.io/zh-cn/api/rendering) for more details.
// And they f... (continued)
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## 模板

### partial
Expand Down
15 changes: 15 additions & 0 deletions source/zh-tw/docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,21 @@ See [Rendering](https://hexo.io/zh-twapi/rendering) for more details.
// Once upon a time
```

### escape_html

Escapes HTML entities in a string.

``` js
<%- escape_html(str) %>
```

**Examples:**

``` js
<%- escape_html('<p>Hello "world".</p>') %>
// &lt;p&gt;Hello &quot;world&quot;.&lt;&#x2F;p&gt;
```

## 模板

### partial
Expand Down

0 comments on commit dd8c202

Please sign in to comment.