mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-26 13:38:59 +00:00
Now escape BBCode
This commit is contained in:
parent
8fa4c5bcc4
commit
aac87943ed
@ -148,4 +148,14 @@ public class StringsUtils {
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove all BBCode tags of a given string
|
||||
*
|
||||
* @param string The string to update
|
||||
* @return The same string, without any bbcode tags
|
||||
*/
|
||||
public static String RemoveBBCode(String string){
|
||||
return string.replaceAll("\\[[a-zA-Z1-9/=#]{1,10}]", "");
|
||||
}
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import org.communiquons.android.comunic.client.data.enums.PageType;
|
||||
import org.communiquons.android.comunic.client.data.models.Comment;
|
||||
import org.communiquons.android.comunic.client.data.models.Post;
|
||||
import org.communiquons.android.comunic.client.data.models.UserInfo;
|
||||
import org.communiquons.android.comunic.client.data.utils.StringsUtils;
|
||||
import org.communiquons.android.comunic.client.data.utils.TimeUtils;
|
||||
import org.communiquons.android.comunic.client.ui.listeners.onPostUpdateListener;
|
||||
import org.communiquons.android.comunic.client.ui.utils.UiUtils;
|
||||
@ -315,7 +316,11 @@ public class PostsAdapter extends BaseRecyclerViewAdapter {
|
||||
|
||||
|
||||
//Set post content
|
||||
mPostContent.setParsedText(UiUtils.prepareStringTextView(post.getContent()));
|
||||
mPostContent.setParsedText(
|
||||
StringsUtils.RemoveBBCode(
|
||||
UiUtils.prepareStringTextView(post.getContent())
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
//Post likes
|
||||
|
Loading…
Reference in New Issue
Block a user