Coder Social home page Coder Social logo

Untracking does not remove about mandown HOT 4 CLOSED

Donnie avatar Donnie commented on August 26, 2024
Untracking does not remove

from mandown.

Comments (4)

Donnie avatar Donnie commented on August 26, 2024

However it does work as expected in case https websites. Without https being mentioned in the input.

from mandown.

Donnie avatar Donnie commented on August 26, 2024

Site: web.Sanitise(m.Payload),

Here web.Sanitise is changing donnie.in to https://donnie.in and successfully deletes https websites even when https is missing in the input.

However, it does not attempt to remove http://donnie.in unless specifically http is used in the input.

Ideally it should try to delete both the http and https websites when the schema is not mentioned in the input.
And be specific when the input is specific.

from mandown.

Donnie avatar Donnie commented on August 26, 2024

return web.Scheme + "://" + web.Hostname()

The solution could lie in the fact that instead of returning a string Sanitise can return a structured form of the website.

If structured form is returned than the consumer would be able to get both the http and https version from the same call.

If structured form is returned that the caller will still need to do a line of work converting it into a string.
That can be avoided by returning two strings instead of one as being done currently.
One being the http form and the other being https form, thereby the caller would have the choice to use any or both very easily without any amount of further code.

from mandown.

Donnie avatar Donnie commented on August 26, 2024

ManDown/web/web.go

Lines 88 to 89 in 93520e7

if err != nil || site == "" {
return ""

Also while at it the Sanitise could ideally throw an error instead of an empty string, so that the caller can handle this possible error without having to check for length of the output url.

from mandown.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.