Skip to content

Issue with rendering % with as_raw_html in Email #657

@tanyanchongDA

Description

@tanyanchongDA

Hi,

I am trying to render % sign in HTML so it can be passed into mailR. However, it seems to be showing "%" rather than %. I have some simple example below to show.

trial <- tibble(trial = c(0.1,0.2,0.3))

gt_html <- trial %>%
  gt() %>%
  fmt_percent(
    columns = vars(trial)
  ) %>%
  as_raw_html(.)

from <- 
to <- 
subject <- paste("Trial Report on ", Sys.Date())
send.mail(from,to,subject,gt_html, encoding = "utf-8",
          smtp = list(
            host.name = "",
            port = ,
            user.name =,
            passwd = ),
            tls = TRUE
          ), authenticate = TRUE, send=TRUE, html=TRUE)

I got this instead though. I remembered it used to render properly about 6 months ago. Is there anything I have missed there?

image

Thank you so much in advance!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions