diff --git a/handlers/embed.go b/handlers/embed.go index c0a577e..69b3c66 100644 --- a/handlers/embed.go +++ b/handlers/embed.go @@ -139,9 +139,11 @@ func Embed() fiber.Handler { sb.WriteString("/") sb.WriteString(strconv.Itoa(max(1, mediaNum))) viewsData.VideoURL = sb.String() - descEscaped := make([]byte, 0, len(viewsData.Description)*2) - descEscaped = fasthttp.AppendQuotedArg(descEscaped, utils.S2B(viewsData.Description)) - viewsData.OEmbedURL = c.BaseURL() + "/oembed?text=" + utils.B2S(descEscaped) + "&url=" + viewsData.URL + + descPool := bytebufferpool.Get() + defer bytebufferpool.Put(descPool) + fasthttp.AppendQuotedArg(descPool.B, utils.S2B(viewsData.Description)) + viewsData.OEmbedURL = c.BaseURL() + "/oembed?text=" + utils.B2S(descPool.Bytes()) + "&url=" + viewsData.URL } if direct {