mirror of https://github.com/zulip/zulip.git
fca8f84c14
We HTML-escape the subject in Postgres to avoid a server round-trip. Unlike the rendered_content, which is already escaped and cached on zephyr_message, we normally escape subjects client-side. Escaping in Django would require fetching the messages that match the query, escaping the subjects, and then making a second query to Postgres to insert the markup. We could instead fetch the messages with subjects marked up using non-HTML (some unique string) that is later converted into the correct markup either in Django or client-side, but then the escaping problem would just be with some random string instead of HTML. Since the function is pretty simple, doing the escaping in Postgres itself is the least painful option. (imported from commit 004931d8e496697c18650aee97b1a74c55a04cb2) |
||
---|---|---|
.. | ||
0001_initial.py | ||
0002_auto__add_field_preregistrationuser_referred_by__add_field_preregistra.py | ||
0003_auto__add_field_stream_invite_only.py | ||
0004_add_postgres_zephyr_message_full_text_idx.py | ||
0005_auto__add_field_subscription_in_home_view.py | ||
0006_add_zephyr_message_search_tsvector.py | ||
0007_populate_zephyr_message_search_tsvector.py | ||
0008_index_zephyr_message_search_tsvector.py | ||
0009_auto__add_field_realm_restricted_to_domain.py | ||
0010_auto__add_userpresence__add_unique_userpresence_user_profile_client.py | ||
0011_auto__add_field_userprofile_enter_sends.py | ||
0012_auto__add_field_usermessage_flags.py | ||
0013_usermessage_unreadcount.py | ||
0014_auto__add_field_message_rendered_content__add_field_message_rendered_c.py | ||
0015_auto__add_field_userprofile_password__add_field_userprofile_last_login.py | ||
0016_auto__del_field_userprofile_user.py | ||
0017_auto__add_field_subscription_color.py | ||
0018_auto__add_unique_userprofile_email.py | ||
0019_auto__add_field_userprofile_tutorial_status.py | ||
0020_set_tutorial_finished.py | ||
0021_auto__add_field_subscription_notifications.py | ||
0022_create_humbug_search_config.py | ||
0023_rebuild_search_tsvector.py | ||
0024_create_escape_html_function.py | ||
__init__.py |