Skip to content

Commit

Permalink
#92 [refactor] html 태그 그대로 적용하게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
parkheeddong committed Jan 13, 2024
1 parent a8ba8c9 commit fd04d01
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.mile.post.domain.Post;
import com.mile.topic.service.dto.ContentWithIsSelectedResponse;
import java.util.List;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;


public record TemporaryPostGetResponse(
Expand All @@ -18,16 +16,11 @@ public static TemporaryPostGetResponse of(Post post, List<ContentWithIsSelectedR
return new TemporaryPostGetResponse(
contentResponse,
post.getTitle(),
getCleanContent(post.getContent()),
post.getContent(),
post.getImageUrl(),
post.isAnonymous()
);
}

private static String getCleanContent(
String content
) {
return Jsoup.clean(content, Whitelist.none());
}

}

0 comments on commit fd04d01

Please sign in to comment.