Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Make HTML-Escaping optional

Đang mở Phù hợp với người mới
#2,456 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start by reading the JSON dump and escaping logic in util.py, then check the tests that cover JSON output. Make the escaping configurable as described, with the default behavior decided consistently with the existing setting. Done when the option controls whether < and > are escaped and the relevant tests pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Is your feature request related to a problem? Please describe.
In the version 0.24.0 the feature "escape < and > on JSON dump" was introduced. We are using oracle provider and the necessary escaping is done on the database side. Because of escaping in pygeoapi our application is working buggy.

Describe the solution you'd like
It would be better to make the escaping optional, f.e. through the environment variable.

Describe alternatives you've considered

Additional context
Now we are forced to use the adjustment of the util.py:

DO_JSON_ESCAPE = os.getenv('JSON_ESCAPE', 'false').lower()
...
...
    # do escaping optional
    if DO_JSON_ESCAPE in ('true', '1', 'yes'):
        LOGGER.debug('Escaping < and >')
        json_dump = json_dump.replace('<', '&lt;')
        json_dump = json_dump.replace('>', '&gt;')
Ngôn ngữ chính
Python
Star
628
Fork
339
Merge trung bình
4 ngày 9 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của geopython/pygeoapi

Tất cả issue của geopython/pygeoapi

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.