I need to rename tags in the task titles in database. I saw similar questions like this one But in my app user could create a task with custom title. So the following solution could be dangerous:
db.execSQL("UPDATE " + Task.TABLE +
" SET title = REPLACE(title, '" + fromTagName + "', '" + toTagName + "');");
What if user will create a task with some dangerous commands in the title (injection)? Will this approach crash? Is there alternative to use special android methods instead of raw SQL commands? Or is it safe as it is?