files. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.
()
| 11596 | @app.route("/profile/save", methods=["POST"]) |
| 11597 | @login_required |
| 11598 | |
| 11599 | def profile_save(): |
| 11600 | """profile_save. |
| 11601 | |
| 11602 | Route handler or application helper. |
| 11603 | |
| 11604 | This docstring was expanded to make future maintenance easier. |
| 11605 | |
| 11606 | Returns: |
| 11607 | Varies. |
| 11608 | """ |
| 11609 | nickname = (request.form.get("nickname") or "").strip() |
| 11610 | bio = (request.form.get("bio") or "").strip() |
| 11611 | links_raw = (request.form.get("links") or "").strip() |
| 11612 | |
| 11613 | links: List[str] = [] |
| 11614 | for line in links_raw.splitlines(): |
| 11615 | line = line.strip() |
| 11616 | if not line: |
| 11617 | continue |
| 11618 | if not (line.startswith("http://") or line.startswith("https://") or line.startswith("mailto:")): |
| 11619 | continue |
| 11620 | links.append(line[:300]) |
| 11621 | |
| 11622 | # Optional fields |
| 11623 | def _lines10(val: str) -> str: |
| 11624 | """_lines10. |
| 11625 | |
| 11626 | Internal helper function. |
| 11627 | |
| 11628 | This docstring was added automatically to improve maintainability. |
nothing calls this directly
no test coverage detected