mirror of https://github.com/zulip/zulip.git
268f858f39
This swaps out url_format_string from all of our APIs and replaces it with url_template. Note that the documentation changes in the following commits will be squashed with this commit. We change the "url_format" key to "url_template" for the realm_linkifiers events in event_schema, along with updating LinkifierDict. "url_template" is the name chosen to normalize mixed usages of "url_format_string" and "url_format" throughout the backend. The markdown processor is updated to stop handling the format string interpolation and delegate the task template expansion to the uri_template library instead. This change affects many test cases. We mostly just replace "%(name)s" with "{name}", "url_format_string" with "url_template" to make sure that they still pass. There are some test cases dedicated for testing "%" escaping, which aren't relevant anymore and are subject to removal. But for now we keep most of them as-is, and make sure that "%" is always escaped since we do not use it for variable substitution any more. Since url_format_string is not populated anymore, a migration is created to remove this field entirely, and make url_template non-nullable since we will always populate it. Note that it is possible to have url_template being null after migration 0422 and before 0424, but in practice, url_template will not be None after backfilling and the backend now is always setting url_template. With the removal of url_format_string, RealmFilter model will now be cleaned with URL template checks, and the old checks for escapes are removed. We also modified RealmFilter.clean to skip the validation when the url_template is invalid. This avoids raising mulitple ValidationError's when calling full_clean on a linkifier. But we might eventually want to have a more centric approach to data validation instead of having the same validation in both the clean method and the validator. Fixes #23124. Signed-off-by: Zixuan James Li <p359101898@gmail.com> |
||
---|---|---|
.. | ||
compose_banner | ||
confirm_dialog | ||
navbar_alerts | ||
settings | ||
stream_settings | ||
user_group_settings | ||
widgets | ||
about_zulip.hbs | ||
actions_popover_content.hbs | ||
actions_popover_template.hbs | ||
all_messages_sidebar_actions.hbs | ||
announce_stream_docs.hbs | ||
blueslip_stacktrace.hbs | ||
bookend.hbs | ||
buddy_list_tooltip_content.hbs | ||
change_email_modal.hbs | ||
compose.hbs | ||
compose_control_buttons.hbs | ||
compose_control_buttons_in_popover.hbs | ||
compose_control_buttons_popover.hbs | ||
compose_select_enter_behaviour_popover.hbs | ||
copy_code_button.hbs | ||
copy_invite_link.hbs | ||
copy_message_button.hbs | ||
copy_to_clipboard_svg.hbs | ||
default_language_modal.hbs | ||
dialog_change_password.hbs | ||
dialog_widget.hbs | ||
draft.hbs | ||
draft_table_body.hbs | ||
drafts_sidebar_action.hbs | ||
edit_content_button.hbs | ||
edited_notice.hbs | ||
embedded_bot_config_item.hbs | ||
emoji_popover.hbs | ||
emoji_popover_content.hbs | ||
emoji_popover_emoji.hbs | ||
emoji_popover_search_results.hbs | ||
emoji_showcase.hbs | ||
empty_feed_notice.hbs | ||
favicon.svg.hbs | ||
feedback_container.hbs | ||
filter_topics.hbs | ||
gear_menu.hbs | ||
giphy_picker.hbs | ||
giphy_picker_mobile.hbs | ||
help_link_widget.hbs | ||
hotspot_icon.hbs | ||
hotspot_overlay.hbs | ||
inline_decorated_stream_name.hbs | ||
input_pill.hbs | ||
invitation_failed_error.hbs | ||
invite_user_modal.hbs | ||
keyboard_shortcuts.hbs | ||
left_sidebar.hbs | ||
left_sidebar_stream_setting_popover.hbs | ||
lightbox_overlay.hbs | ||
loader.hbs | ||
login_to_access.hbs | ||
login_to_view_image_button.hbs | ||
mark_as_read_disabled_banner.hbs | ||
mark_as_read_turned_off_banner.hbs | ||
markdown_help.hbs | ||
markdown_time_tooltip.hbs | ||
markdown_timestamp.hbs | ||
me_message.hbs | ||
message_avatar.hbs | ||
message_body.hbs | ||
message_controls.hbs | ||
message_edit_form.hbs | ||
message_edit_history.hbs | ||
message_feed_bottom_whitespace.hbs | ||
message_feed_errors.hbs | ||
message_group.hbs | ||
message_hidden_dialog.hbs | ||
message_history_modal.hbs | ||
message_inline_image_tooltip.hbs | ||
message_reaction.hbs | ||
message_reactions.hbs | ||
message_view_header.hbs | ||
mobile_message_buttons_popover_content.hbs | ||
more_pms.hbs | ||
more_topics.hbs | ||
more_topics_spinner.hbs | ||
move_topic_to_stream.hbs | ||
muted_topic_ui_row.hbs | ||
muted_user_ui_row.hbs | ||
narrow_to_compose_recipients_tooltip.hbs | ||
navbar.hbs | ||
navbar_icon_and_title.hbs | ||
no_arrow_popover.hbs | ||
non_editable_user_group.hbs | ||
playground_links_popover_content.hbs | ||
pm_list_item.hbs | ||
presence_row.hbs | ||
presence_rows.hbs | ||
read_receipts.hbs | ||
read_receipts_modal.hbs | ||
recent_topic_row.hbs | ||
recent_topics_filters.hbs | ||
recent_topics_table.hbs | ||
recipient_row.hbs | ||
remind_me_popover_content.hbs | ||
resolve_topic_time_limit_error_modal.hbs | ||
right_sidebar.hbs | ||
scheduled_message.hbs | ||
scheduled_messages_overlay.hbs | ||
search_list_item.hbs | ||
search_operators.hbs | ||
send_later_popover.hbs | ||
set_status_overlay.hbs | ||
settings_overlay.hbs | ||
settings_tab.hbs | ||
single_message.hbs | ||
starred_messages_sidebar_actions.hbs | ||
status_emoji.hbs | ||
status_emoji_selector.hbs | ||
stream_privacy.hbs | ||
stream_sidebar_actions.hbs | ||
stream_sidebar_row.hbs | ||
stream_topic_widget.hbs | ||
streams_subheader.hbs | ||
subscribe_to_more_streams.hbs | ||
topic_edit_form.hbs | ||
topic_list_item.hbs | ||
topic_muted.hbs | ||
topic_sidebar_actions.hbs | ||
topic_typeahead_hint.hbs | ||
typeahead_list_item.hbs | ||
typing_notification.hbs | ||
typing_notifications.hbs | ||
user_custom_profile_fields.hbs | ||
user_group_info_popover.hbs | ||
user_group_info_popover_content.hbs | ||
user_group_list_item.hbs | ||
user_info_popover_content.hbs | ||
user_info_popover_manage_menu.hbs | ||
user_info_popover_title.hbs | ||
user_profile_modal.hbs | ||
user_stream_list_item.hbs | ||
user_with_status_icon.hbs | ||
view_code_in_playground.hbs |