I made it `get_body_data`, so it refers to the element whose data attributes it is getting.

Beyond that, it is pretty generic - any string can be stored in these data attributes, and since it's embedded in HTML, it should always be encoded. On the javascript side, we should never deal with encoded strings, so it is always right to decode it.