subroutineinline_entityprivate
subroutine inline_entity(text, i, out, used)
Handle &: an entity stays as it is, anything else is escaped.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| text | character(len=*) | in | the text | |
| i | integer | in | where it is | |
| out | type(buffer_t) | inout | the HTML | |
| used | integer | out | how much was used |
Calls
Source
Show the code
subroutine inline_entity(text, i, out, used)
character(len=*), intent(in) :: text !! the text
integer, intent(in) :: i !! where it is
type(buffer_t), intent(inout) :: out !! the HTML
integer, intent(out) :: used !! how much was used
integer :: close
close = index(text(i:), ';')
used = 1
if (close > 2) then
if (verify(text(i + 1:i + close - 2), WORD_CHARS(:62)//'#') == 0) then
call add(out, text(i:i + close - 1))
used = close
return
end if
end if
call add(out, '&')
end subroutine inline_entity